Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10071

Exclude projects or repositories from code search results


    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Search
    • 54
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Atlassian status as of June 2022

      Hi everyone,

      In Bitbucket Data Center 8.0 we have released repository archiving. Admins can now archive unused repositories to declutter Bitbucket. We have also added a search modifier archived: to help users filter archived repositories in code search:

      Query Usage
      archived:true  Matches only repositories that are archived.
      archived:false Matches only repositories that are active. Note that this filter is used by default.
      archived:* Matches all repositories (both archived and active)

      More Bitbucket search syntax

      We understand that is not exactly what you expect, but repository archiving gives many customers path forward to exclude old, unused repositories from search results.

      Anton Genkin
      Product Manager - Bitbucket Data Center & Server

      Problem Definition

      Code search does not allow you to exclude projects and or repositories. The documentation states that if multiple modifiers are in a query they are implicitly combined using "AND". No such functionality exists to exclude or use "NOT" with modifiers if you are wanting to exclude a project or repository from your text search.

      <more information needed - why is this a problem?>

      Suggested Solution

      Allow code search to exclude projects and or repositories. Example queries below:

       # Search for the word "text" everywhere EXCEPT repository Test.
      text NOT repo:test
       # Search for the word "text" everywhere EXCEPT project Test.
      text NOT project:test

            Unassigned Unassigned
            mwilliams@atlassian.com Mark A.
            176 Vote for this issue
            89 Start watching this issue