# Min\_score doesn't working with aggs

**URL:** <https://discuss.elastic.co/t/min-score-doesnt-working-with-aggs/208154>\
**Category:** Elasticsearch\
**Created:** [November 16, 2019, 10:47am UTC](https://discuss.elastic.co/t/min-score-doesnt-working-with-aggs/208154 "2019-11-16T10:47:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sagar\_Kayasth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagar_kayasth/32/57807_2.png) [@Sagar\_Kayasth](https://discuss.elastic.co/u/Sagar_Kayasth)\
**Post date:** [November 16, 2019, 10:47am UTC](https://discuss.elastic.co/t/min-score-doesnt-working-with-aggs/208154/1 "2019-11-16T10:47:49Z")

</div>

Hello,  
Can any elastic search member help me for prepare aggregation query with min\_score?

In below i wrote my query, and this elastic query run but not getting any document count, but 1000 score documents are available.  
Request:  
GET product/\_search  
{  
"min\_score":1000,  
"size":0,  
"aggs":{  
"PriceRanges":{  
"filter":{  
"bool":{  
"should":[  
{  
"match\_all":{  
}  
}  
],  
"must":[  
{  
"term":{  
"Published":{  
"value":"true"  
}  
}  
},  
{  
"bool":{  
"should":[  
{  
"match":{  
"Stores.Id":0  
}  
},  
{  
"match":{  
"Stores.Id":2  
}  
}  
]  
}  
}  
]  
}  
},  
"aggs":{  
"Facets":{  
"range":{  
"field":"UCF\_FinalPrice",  
"ranges":[  
{  
"to":"100"  
},  
{  
"from":"101",  
"to":"998"  
},  
{  
"from":"999",  
"to":"1999"  
},  
{  
"from":"2000",  
"to":"2999"  
},  
{  
"from":"3000"  
}  
]  
}  
}  
}  
}  
}

```
}

```

Response result:  
{  
"took" : 4,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"skipped" : 0,  
"failed" : 0  
},  
"hits" : {  
"total" : 0,  
"max\_score" : 0.0,  
"hits" :   
},  
"aggregations" : {  
"PriceRanges" : {  
"doc\_count" : 0,  
"Facets" : {  
"buckets" : [  
{  
"key" : "_-100.0",  
"to" : 100.0,  
"doc\_count" : 0  
},  
{  
"key" : "101.0-998.0",  
"from" : 101.0,  
"to" : 998.0,  
"doc\_count" : 0  
},  
{  
"key" : "999.0-1999.0",  
"from" : 999.0,  
"to" : 1999.0,  
"doc\_count" : 0  
},  
{  
"key" : "2000.0-2999.0",  
"from" : 2000.0,  
"to" : 2999.0,  
"doc\_count" : 0  
},  
{  
"key" : "3000.0-_",  
"from" : 3000.0,  
"doc\_count" : 0  
}  
]  
}  
}  
}  
}

---

<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 14, 2019, 10:49am UTC](https://discuss.elastic.co/t/min-score-doesnt-working-with-aggs/208154/2 "2019-12-14T10:49:55Z")

</div>

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