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

Exclude user forks from code search results

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • 4.14.0
    • Search
    • None
    • 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.

    Description

      Bitbucket Server code search does not discriminate between repos in projects and repos in user forks, so when searching for text, the following two annoying things can happen:

      1. multiple duplicates of the same file are displayed in search results, one per fork of the repo.
      2. often the file(s) in the "upstream" repository appear far down in the search results below the acres of user forks

      Because Bitbucket Server codesearch does not support passing wildcards to elasticsearch, it is not possible to search for "foo NOT proj:~*"

      The old third-party Palantir codesearch add-on (https://github.com/terabyte/stash-codesearch-plugin) provided a simple checkbox to exclude user forks from search results – under the hood it simply passed filter.mustNot(prefixFilter("project", "~") to the elasticsearch java API.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              f198789b9dbc Nathan Mehl
              Votes:
              18 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: