Add blob search aggregations for language
What does this MR do and why?
Related to Epic: &6853 (closed) Issue: #342642 (closed)
This adds aggregations to the Elasticsearch query (used by Advanced Search) for blob searches only. Aggregations will not be included when count_only
searches are being run (used for the count tabs at the top of the search results page).
We have done some benchmarking (see related issue) but want to release behind a feature flag (search_blobs_language_aggregation
) to be able to quickly roll back in performance is impacted. The feature flag will be rolled out using user
actors via: #342621 (closed)
Screenshots or screen recordings
N/A
How to set up and validate locally
- Enable the feature flag for the user you are logging into gdk with:
Feature.enable(:search_blobs_language_aggregation, user)
- Run a code search (global, group or project level - it does not matter which)
- Verify that the aggregations show up in the performance bar for the blob search (what you are looking for is the
aggs
section in the JSON request to Elasticsearch, near the bottom) - Verify that aggregations do not show up in the performance bar for the other count queries
- Run a non-code search
- Verify that aggregations do not show up in the performance bar for the search
- Verify that aggregations do not show up in the performance bar for the blobs count
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.
Edited by Terri Chu