Issue & blob aggregations for group searches do not use traversal_ids
What does this MR do and why?
Add group_ids
in the base_options
for Gitlab::Elastic::GroupSearchResults
. I think it makes sense to add group_id
in base_options
for group level search. With this change aggregation end point will get the group_ids
and therefore traversal_ids
filter will be added.
In ee/lib/gitlab/elastic/search_results.rb
have to use base_options.reverse_merge(group_ids: group_ids)
because merge
was overwriting the group_ids
for the group level search. With the reverse_merge
it will not overwrite the group_ids
which can be added only in the case of group level search. And for global search group_ids
will be added as a new key.
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
- Ensure Elasticsearch is enabled
- Perform a Group level code search
- Select the aggregations endpoint from the performance bar for ES queroies
- Verify that
blob:authorized:namespace:ancestry_filter
exists
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #416129 (closed)