Add merge request search query builder
What does this MR do and why?
Related to #462679 (closed)
High level: this MR refactors the Elasticsearch query generation to use the new query builder classes. It's done behind a derisk feature flag. There is no behavior change in the UI or backend, just refactor of how the ES query is generated.
- Add Merge request query builder and specs
- Add support in
by_authorization
filter to not attempttraversal_ids
filtering. Not all indexes havetraversal_ids
indexed yet. - Add more filter specs for missing checks: when
traversal_id_prefix
is provided, new support check fortraversal_ids
- Create shared examples to for queries, filters, and formats. These are now used issues and merge request query builder specs
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
N/A
How to set up and validate locally
- enable elasticsearch and advanced search in gdk
- index everything using
gitlab:elastic:index
rake task - ensure flag is disabled
echo "Feature.disable(:search_merge_request_query_builder)" | gdk rails c
- perform searches for merge requests at project, group, global levels
- note the results and counts returned for each
- ensure flag is enabled
echo "Feature.enable(:search_merge_request_query_builder)" | gdk rails c
- perform the same searches for merge requests at project, group, global levels
- verify you get the same results and counts returned for each
Edited by Ravi Kumar