Elastic Search returning only a subset of expected results

ZD: https://gitlab.zendesk.com/agent/tickets/91450

We queried ES directly and saw 11,000 hits (mind you this was not filtered):

"hits": {
    "total": 11039,
    "max_score": 35.892307,
    "hits": [

In GLUI, we'd get 29 results for that query. We recreated the query in the console, and also saw 29 results using:

Gitlab::Elastic::SearchResults.new(u,"<query string>",:any, true)

It seems like some kind of permissions problem or some such issue.

From @vsizov in slack

think I know what's the problem. We don't have to compare result from _search?q=* with GitLab app search as it's not really the same. For example, a simple search does not use "search time" analyzers we set for every search. See details here https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-uri-request.html We use simple_query_string search https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

Edited Sep 02, 2020 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading