Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to search by file extension or language

Rajiv Pardiwala February 19, 2020 edited

When trying to search all bitbucket repositories i'm getting an oops! there is a problem.

https://bitbucket.org/search?q=ext%3Apy

I'm trying to search by file extension

ext:py

or language

lang:python

 

Edit: solution was to include the 'search term' which is the actual file extension also, ie:

ext:py py

1 answer

1 accepted

0 votes
Answer accepted
seanaty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

In the console I'm seeing this message, "Query did not contain any search terms (only modifiers)" which isn't surfacing to the UI.

In any case, I think this should explain why it's not working. It appears that having a search term is required.

Rajiv Pardiwala February 19, 2020 edited

according to the docs this query should work, what am i missing?

seanaty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

Could you please provide a quote and a link for reference? Looking at this page: https://confluence.atlassian.com/bitbucket/search-873876782.html it's not explicitly called out that you must include a search term, however, every single example, even examples about how to use and combine modifiers, all include a search term.

seanaty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

That's correct. It's the same error. There is still no search term. "ext:py" and "NOT" and "path:thisdontwork" are all modifiers. Add a search term and it should work.

```ext:py NOT path:pyc mySearchTerm```

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

Hello @Rajiv Pardiwala,

Search dev here. Important line from the linked document:

Operators cannot be used alone; they must be used with an accompanying search term.

ext and path are operators. The query has to contain at least one term to match file path or file content – a word, simply speaking.

Rajiv Pardiwala February 19, 2020 edited

How do i find all instances without any search term?

edit: nm figured something that kind of works.  this seems like a missing feature to me though.

ext:py py

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2020

How do i find all instances without any search term?

There's no way to do this, it was one of the cases we intentionally didn't cover because it has some implications. You'd need to work around like you did. There's no universal work around though.

Rajiv Pardiwala February 19, 2020

it would be helpful to mention this specific case in the docs.  thanks for the help in solving this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Bitbucket Events