Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bug searching by repository name with a dot in the name

When a repository has a dot in the name, like `this-is-my.new-repository`, the search doesn't work when you search for the word after the dot.

  • [NO OK] Search: new
  • [OK] Search: this
  • [OK] Search: is
  • [OK] Search: my
  • [OK] Search: this-is-my
  • [OK] Search: my.new
  • [OK] Search: this-is-my.new-repository

Looking for why this happens, it is because of the indexation of the name into ElasticSearch. Bitbucket is using a field that is not tokenized, so the search will work only for full match of the field or match of the words separated by hyphen or underscore, but doesn't for dots. In Elasticsearch, for fields of type string, the word before the dot, the dot and the word after the dot is tokenized as a full word. So you for the repository name used before, Elasitcsearch will tokenize into this words:

  • this
  • is
  • my.new
  • repository

 

Here you can see the query executed by Bitbucket to find projects and repositories by name.

Query executed to find the repository name in Elasticsearch

{
"from": 0,
"size": 25,
"query":
{
"bool":
{
"should": [
{
"function_score":
{
"query":
{
"bool":
{
"filter": [
{
"term":
{
"quickSearchProjectName":
{
"value": "new",
"boost": 1.0
}
}
}],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1.0
}
},
"functions": [
{
"filter":
{
"match_all":
{
"boost": 1.0
}
},
"weight": 1.5,
"field_value_factor":
{
"field": "quickSearchProjectName.length",
"factor": 1.0,
"modifier": "reciprocal"
}
}],
"score_mode": "multiply",
"boost_mode": "replace",
"max_boost": 3.4028235E38,
"boost": 1.0
}
},
{
"function_score":
{
"query":
{
"bool":
{
"filter": [
{
"term":
{
"quickSearchRepositoryName":
{
"value": "new",
"boost": 1.0
}
}
}],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1.0
}
},
"functions": [
{
"filter":
{
"match_all":
{
"boost": 1.0
}
},
"weight": 5.0,
"field_value_factor":
{
"field": "quickSearchRepositoryName.length",
"factor": 1.0,
"modifier": "reciprocal"
}
}],
"score_mode": "multiply",
"boost_mode": "replace",
"max_boost": 3.4028235E38,
"boost": 1.0
}
}],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1.0
}
},
"sort": [
{
"_score":
{
"order": "desc"
}
},
{
"quickSearchProjectName.raw":
{
"order": "asc"
}
},
{
"quickSearchRepositoryName.raw":
{
"order": "asc"
}
}]
}

 

2 comments

Hi @aferrandini_vocento,

Thanks for your detailed report (awesome job there).

 

With the Bitbucket Server release 5.7, we have introduced some functionalities to support "Punctuation aware code search". However, this was mainly focusing around the search in the code and not the project or repository name. Here is the link to the request for more details:

BSERV-8782 - Punctuation aware code search

 

Could you share which version of Bitbucket Server you are using so that I can do some testing and confirm if we already have a request around this or raise one for you?

 

Cheers,

Caterina - Atlassian

Hi @Caterina Curti

We are using v5.8.1 in production, but this bug also happens in v5.11.1, the version I used to reproduce in and extract the logs and the queries.

 

Have a nice week :),

Ariel - Vocento

Hi, any news about this?

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

630 views 7 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you