# Filter query taking much time in build\_score why?

**URL:** <https://discuss.elastic.co/t/filter-query-taking-much-time-in-build-score-why/157735>\
**Category:** Elasticsearch\
**Created:** [November 21, 2018, 3:31pm UTC](https://discuss.elastic.co/t/filter-query-taking-much-time-in-build-score-why/157735 "2018-11-21T15:31:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pksinghal](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pksinghal](https://discuss.elastic.co/u/pksinghal)\
**Post date:** [November 21, 2018, 3:31pm UTC](https://discuss.elastic.co/t/filter-query-taking-much-time-in-build-score-why/157735/1 "2018-11-21T15:31:34Z")

</div>

We have upgraded our ES from ES-2.3 to ES-6.4. So we have done reindexing of all our indexes.

Now while running the query to new elasticsearch, we got performance with such queries :

{  
"\_source": false,  
"query": {  
"bool": {  
"filter": {  
"bool": {  
"must": [  
{  
"range": {  
"visitTime": {  
"gte": "2018-07-18T18:30:00"  
}  
}  
}  
],  
"must\_not": [  
{  
"exists": {  
"field": "source"  
}  
}  
]  
}  
}  
}  
}  
}

 ![es_problem%20(1)](https://us1.discourse-cdn.com/elastic/original/3X/1/7/175cc618a052c2f5b9437f2011ff121ad36a0f5d.png)

So my question is why ES query taking much time in build\_scorer ???? When running the same query in ES 2.3, take much less time.

---

<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:** [December 19, 2018, 3:31pm UTC](https://discuss.elastic.co/t/filter-query-taking-much-time-in-build-score-why/157735/2 "2018-12-19T15:31:43Z")

</div>

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