Filter context strange results on ElasticSearch 6.3.0

Hi all,

I was checking why a terms query inside a nested query was taking so long, and realized that I got some strange results with 'profile'. The way I understand it, the "build_scorer" field in the breakdown results tells how much time was spent in creating the objects that compute a score.

In my case, I wasn't using any 'must' query, but 'filter' everywhere (which for what I understand, should disable any scoring computation). However, when looking at the results from the profile API I got results such as:

{
"type": "TermInSetQuery",
"description": "samples.sample:(<list_of_samples>)",
"time_in_nanos": 6124254609,
"breakdown": {
"score": 0,
"build_scorer_count": 93,
"match_count": 0,
"create_weight": 908,
"next_doc": 0,
"match": 0,
"create_weight_count": 1,
"next_doc_count": 0,
"score_count": 0,
"build_scorer": 6124251817,
"advance": 1743,
"advance_count": 47
}
}
As you can see, it spends most of the time in "build_scorer", but it doesn't spend any time in "score". Does it still try to build the objects that compute the score even if it's in a filter context?

I also saw in the documentation that "build_scorer" could be associated with caching, but even if I disable the cache, it still returns the same results. Am I missing something?

Thanks.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.