Skip to content

Update analyzer for the epics description and title

Ravi Kumar requested to merge 435050-code_analyzer-epics-title into master

What does this MR do and why?

This MR adds the code_analyzer for the description and title_analyzer for the title in the epics index. In addition to that I have added a migration ReindexEpicsToUpdateAnalyzer which uses Zero downtime reindexing to reindex all the epics to use the new analyzers.

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:

Testing for title

  • Create an epic with a title dots.also.need.testing
  • Make sure this new epic is available on Elasticsearch. You might need to wait a bit or sometimes restart the rails-background-jobs
  • Now perform a group search under the epic's group with the keyword also.need
  • You won't find the created epic 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

Testing for description

  • Create an epic with a description dots.also.need.testing
  • Make sure this new epic is available on Elasticsearch. You might need to wait a bit or sometimes restart the rails-background-jobs
  • Now perform a group search under the epic's group with the keyword also.need
  • You won't find the created epic in the search results

Now switch to the MR branch

Testing for title

  • Run the bundle exec rake gitlab:elastic:index to reindex the epics with the new analyzer
  • Make sure this new epic 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 epic's group with the keyword also.need
  • You will find the created epic 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

Testing for description

  • Create an epic with a description dots.also.need.testing
  • Make sure this new epic is available on Elasticsearch. You might need to wait a bit or sometimes restart the rails-background-jobs
  • Now perform a group search under the epic's group with the keyword also.need
  • You find the created epic in the search results

Migration run time

~ 30 seconds

Related to #435050 (closed)

Edited by Ravi Kumar

Merge request reports