In our installation the number of results depends on the position of the 'size' key in the request.
e.g.
curl -XPOST localhost:9200/hep/_search -d '{ "size": 25, "query": { "multi_match": { "message": { "fields": [ "title^3", "title.raw^10", "abstract^2", "abstract.raw^4", "author^10", "author.raw^15", "reportnumber^10", "eprint^10", "doi^10" ], "operator": "or", "query": "ellis ", "zero_terms_query": "all" } } } }' -o /tmp/size
Vs.
curl -XPOST localhost:9200/hep/_search -d '{ "query": { "multi_match": { "message": { "fields": [ "title^3", "title.raw^10", "abstract^2", "abstract.raw^4", "author^10", "author.raw^15", "reportnumber^10", "eprint^10", "doi^10" ], "operator": "or", "query": "ellis ", "zero_terms_query": "all" } } }, "size":25 }' -o /tmp/size2
Gives two different results:
wc /tmp/size* 0 2293415 24129993 /tmp/size 0 697658 7396394 /tmp/size2
Somehow when size
is last, it is ignored (and default value of 10 is used).
Note that this seems not to be the case on ES 2.0.0