# Rescore not working with 1.5.2

**URL:** <https://discuss.elastic.co/t/rescore-not-working-with-1-5-2/45829>\
**Category:** Elasticsearch\
**Created:** [March 30, 2016, 4:36pm UTC](https://discuss.elastic.co/t/rescore-not-working-with-1-5-2/45829 "2016-03-30T16:36:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andynuss](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@andynuss](https://discuss.elastic.co/u/andynuss)\
**Post date:** [March 30, 2016, 4:36pm UTC](https://discuss.elastic.co/t/rescore-not-working-with-1-5-2/45829/1 "2016-03-30T16:36:53Z")

</div>

I am using elasticsearch 1.5.2 because that's all AWS will give me right now. I have the following query with rescoring of large html documents (100000 total for this test):

{  
"\_source" : [],  
"query" : {  
"filtered" : {  
"filter" : {  
"term" : {  
"user\_ids" : 0  
}  
},  
"query" : {  
"match" : {  
"body" : {  
"query" : "autism explained",  
"minimum\_should\_match" : 2  
}  
}  
}  
}  
},  
"rescore" : {  
"window\_size" : 100,  
"query" : {  
"rescore\_query" : {  
"match" : {  
"synopsis" : {  
"query" : "autism explained",  
"operator" : "or"  
}  
}  
}  
}  
}  
}

My url is:  
[http://xxx.us-west-2.es.amazonaws.com:80/article\_index\_en/article/\_search?size=20&from=20](http://xxx.us-west-2.es.amazonaws.com:80/article_index_en/article/_search?size=20&from=20)

As you can size the idea is that we specify a window\_size of 100, allowing 5 pages of 20 hits each. The query for the first page with size=0 and from=0 works. But the second page with size=20 and from=20 fails as follows:

{timed\_out=false, hits={hits=[], max\_score=0.8249064, total=306}, took=4, \_shards={failed=0, total=1, successful=1}}

Why would I get a search criteria total of 306 but an empty hits array? Is this a bug in my query json, or a bug in 1.5.2?

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [April 1, 2016, 12:36pm UTC](https://discuss.elastic.co/t/rescore-not-working-with-1-5-2/45829/2 "2016-04-01T12:36:22Z")

</div>

Are you sure you are not specifying size=0 somewhere by mistake? That is the only reason I can think of that would cause getting back no hits although there are matches. If that's not the case, can you post your search response and a complete recreation of the problem please?

Thanks  
Luca

---

<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:** [July 5, 2017, 11:03pm UTC](https://discuss.elastic.co/t/rescore-not-working-with-1-5-2/45829/3 "2017-07-05T23:03:17Z")

</div>


