Make code-like content findable in notes in advanced search
requested to merge 433259-make-code-like-content-findable-in-notes-comments-in-advanced-search into master
What does this MR do and why?
This MR switches the notes.note
field's analyzer from standard
to code_analyzer
. We believe that it's going to improve search quality.
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
How to set up and validate locally
- Make sure Elastic search is enabled
On the master
branch:
- Create a Note with the content
dots.also.need.testing
on any issue in any project - Make sure this new note 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 note's project with the keyword
also.need
- You won't find the created note in the search results
Now switch to the MR branch:
- Run the
bundle exec rake gitlab:elastic:index
to reindex the notes with the new analyzer - Make sure this new note 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 note's project with the keyword
also.need
- You will find the created note in the search results
Completion time
~ 4 hours
Related to #433259 (closed)
Edited by Ravi Kumar