Switch issue.title to a new analyzer
What does this MR do and why?
This MR creates a new analyzer title_analyzer
and adds it to the title
in the issues
index. There is migration ReindexIssueToUpdateAnalyzerForTitle
which uses Zero downtime reindexing to reindex all the issues to fix the analyzer for the title
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Make sure Elastic search is enabled
On the master
branch:
- Create an Issue with a title
dots.also.need.testing
- Make sure this new issue is available on Elasticsearch. You might need to wait a bit or sometimes restart the
rails-background-jobs
- Now perform a project search under the issue's project with the keyword
also.need
- You won't find the created issue in the search results
- Repeat the process for the following table and you should not see the result.
Title of the issue | Search Query |
---|---|
köln | koln |
koln_berlin | koln |
kolnBerlin | koln |
Now switch to the MR branch
- Run the
bundle exec rake gitlab:elastic:index
to reindex the issues with the new analyzer - Make sure this new issue is available on Elasticsearch. You might need to wait a bit or sometimes restart the
rails-background-jobs
- Now perform a project search under the issue's project with the keyword
also.need
- You will find the created issue in the search results
- Repeat the process for the following table and you should see the result.
Title of the issue | Search Query |
---|---|
köln | koln |
koln_berlin | koln |
kolnBerlin | koln |
Migration run time
~36 minutes
Related to #439089 (closed)
Edited by Ravi Kumar