Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Abernacky
Contributor
April 28, 2017

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

2 votes
Ben Stuart
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2017

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

Abernacky
Contributor
May 22, 2018

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

Like # people like this
0 votes
Abernacky
Contributor
May 22, 2018

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
TAGS
AUG Leaders

Atlassian Community Events