# Filter context strange results on ElasticSearch 6.3.0

**URL:** <https://discuss.elastic.co/t/filter-context-strange-results-on-elasticsearch-6-3-0/140886>\
**Category:** Elasticsearch\
**Created:** [July 20, 2018, 12:05pm UTC](https://discuss.elastic.co/t/filter-context-strange-results-on-elasticsearch-6-3-0/140886 "2018-07-20T12:05:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cluengo](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@cluengo](https://discuss.elastic.co/u/cluengo)\
**Post date:** [July 20, 2018, 12:05pm UTC](https://discuss.elastic.co/t/filter-context-strange-results-on-elasticsearch-6-3-0/140886/1 "2018-07-20T12:05:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2018, 12:05pm UTC](https://discuss.elastic.co/t/filter-context-strange-results-on-elasticsearch-6-3-0/140886/2 "2018-08-17T12:05:36Z")

</div>

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