Search not using the main branch
Asked by Michael Prado:

Hi there,

It started a few months ago but we are noticing that when searching for particular words, the search results are using old commits and not the main/master branch.

When we navigate to the object (a stored procedure, for example), the searched word is not there because the displayed object is the most up-to-date (whereas the search results are from previous commits).

Is there a way to "force" a re-index of a given repo?


Answers:
author: Caroline R
body: Hi, [@Michael Prado](/t5/user/viewprofilepage/user-id/3606175), thank you for reaching out to Atlassian Community.

Usually, a push/merge to the main branch should trigger reindexing, but as you said this has been happening for some time, there might be a problem with this repository.

Could you please share the name of this repo masked with \*\*\* in the middle, so we can check this on our side?

Looking forward to hearing from you.

Kind regards,  
Caroline

comments: author: Michael Prado
body: Hi [@Caroline R](/t5/user/viewprofilepage/user-id/3934006)

Here they are:

[https://bitbucket.org/\*\*\*\*\*\*/martha-database/branches/](https://bitbucket.org/******/martha-database/branches/)  
[https://bitbucket.org/\*\*\*\*\*\*/marthaui/branches/](https://bitbucket.org/******/marthaui/branches/)  
[https://bitbucket.org/\*\*\*\*\*\*/martha2/src/master/](https://bitbucket.org/******/martha2/src/master/)  
[https://bitbucket.org/\*\*\*\*\*\*/wre.martha/branches/](https://bitbucket.org/******/wre.martha/branches/)

The top one is the first we noticed. If you search for "TTTechID" ( <https://bitbucket.org/search?account=>\<our_account_id\>\&q=TTTechID ) you will see many results but when you open some of those files, we don't see any reference inside them.

Another example is when you search for "CRM_OrdersJobSubCategory".

The very first result, if you click, it takes us to this:

![](https://i.imgur.com/9DheXSa.png)


author: Michael Prado
body: Did you find what's wrong, [@Caroline R](/t5/user/viewprofilepage/user-id/3934006) ? :-)


author: Caroline R
body: Hi [@Michael Prado](/t5/user/viewprofilepage/user-id/3606175), sorry for taking so long, I had to ask our dev team to run a reindex on your repositories. They confirmed they ran this, so I would like to ask you to test the search and confirm if it works now.

Looking forward to hearing from you.

Kind regards,  
Caroline


author: Michael Prado
body: Did not work, [@Caroline R](/t5/user/viewprofilepage/user-id/3934006)

If they run the tests I described, they will see that either it's an indexing issue or a bug in the search tool.


author: Caroline R
body: Hi [@Michael Prado](/t5/user/viewprofilepage/user-id/3606175), thanks for your update. In this case, we will need to access these repos to further investigate what is causing this issue, so I have created an internal ticket for you using the email of your community account.

You should have received an email with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.

Please feel free to let me know if you have any questions.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud