Skip to content

Make code-like content findable in epics for advanced search

What does this MR do and why?

This MR switches the epics.description field's analyzer from standard to code_analyzer. We believe that it's going to improve search quality. Further I have renamed and moved the shared context with elastic code examples from ee/spec/lib/gitlab/elastic/search_results_spec.rb to the shared_contexts/ for reusability.

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 Epic with any title and 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

  • 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 group search under the epic's group with the keyword also.need
  • You will find the created epic in the search results

Related to #435050 (closed)

Edited by Ravi Kumar

Merge request reports