Skip to content

Autocomplete API improvement

Dmitry Gruzd requested to merge 361520-autocomplete-api-improvement into master

What does this MR do and why?

This MR adds a new parameter called filter to SearchController#autocomplete. The goal is to separate expensive search calls from the rest of the autocompletion result for frontend to send requests in parallel and have much faster initial results. This parameter can be set to:

  • search for performing expensive searches
  • generic for recent issues / merge requests and other generic autocomplete options
  • <empty> for the current behaviour when everything is returned at once

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Check out http://localhost:3000/search/autocomplete?term=flight
  2. If we combine http://localhost:3000/search/autocomplete?term=flight&filter=generic and http://localhost:3000/search/autocomplete?term=flight&filter=search, they should return exactly the same result as the first one

MR acceptance checklist

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

Related to #361520 (closed)

Edited by Dmitry Gruzd

Merge request reports