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
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?