Skip to content

Draft: Add search sort by popularity for merge requests

What does this MR do and why?

Related to #263365

Note: This change is behind a feature flag that will be rolled out in #341038 (closed)

This MR introduces the ability to sort merge request search results by popularity for Basic Search (backed by PostgreSQL) and Advanced Search (backed by Elasticsearch).

Screenshots or screen recordings

Before/After

Basic Search Advanced Search
image image
image image

How to set up and validate locally

Note: you must have your gdk setup to support Elasticsearch

  1. Enable the feature flag: Feature.enable(:search_sort_merge_requests_by_popularity)
  2. Verify that there are merge requests with 👍 award emoji
  3. Run an Advanced Search
  4. Verify sort by popularity is available and works
  5. Run a Basic Search (you can append &basic_search=true to the end of the search URL to do this)
  6. Verify sort by popularity is available and works

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Terri Chu

Merge request reports