How can I exclude specific projects and/or repositories from a BitBucket Search query? Edited

My company has >100 repositories in >50 projects and I want my search to go over like 95% of them, without have to search in each one individually.  I want to be able to exclude a few projects/repos from my searches.

The documentation I found (1, 2, 3) didn't tell me any way that that I can exclude a specific Project or Repository from my search.  


For example, I am able to search in a single project or repository by using queries like these

  • SP_ObjectName1 repo:Project1/Repository1
  • SP_ObjectName1 project:Project1



But I am not able to exclude a project or repository from my search 

  1. SP_ObjectName1 NOT project:Project1
    • Error: "Your query couldn't be parsed. We've searched with a modified query."
    • Searches ONLY in Project 1
    • Returns reults where these strings are highlighted:
      • SP_ObjectName1
      • SP
      • NOT
  2. SP_ObjectName1 -project:Project1
    • No error
    • Searches in all projects
    • Returns results where these strings are highlighted:
      • SP_ObjectName1
      • SP
  3. I get the same errors when you replace the project portion of 1 & 2 with "repo:Project1/Repository1", so I didn't think it was worth writing up.

2 answers

0 votes

Hey Jessica,

This is a feature reqeust that was raised in BSERV-9722. Unfortunately this isn't currently possible and it's not on the roadmap for the near future. In order to draw attention to that particular feature request, feel free to watch, comment and vote on this issue. For reference, this is our policy on how new features are implemented.

Wish we had a better answer for you!


Looks like BSERV-10071 has also been opened about excluding a project or repo from search results

Note that the issue with Bitbucket parsing on the underscores is supposed to be fixed in BitBucket Server 5.7 (see "Punctuation aware code search")

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

678 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you