Implement boolean queries in advanced search
Problem to solve
Currently, we don't do much in terms of relevance and ranking in GitLab's advanced search. There is some low-hanging fruit in implementing boolean queries to increase the likelihood that the most relevant search match is being displayed at the top of the results.
Proposal
Take the steps outlined in this Elasticsearch article to implement a strategy of utilizing multiple boolean queries, implementing a combination of:
- Default match query (OR operator)
- Match query with AND operator
- Match phrase query
Additionally, we should add a field boost (say, 2) to the match phrase clause.
Scope
We should do this for each of the searchable indexes in Elastic except code.
Edited by Ben Venker