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

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!

Ben

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,408 views 26 12
Join discussion

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