Elasticsearch version 2.3.3.
I have a document indexed with _id
: 506GBBO25953J
. And I want to get only this one document. The problem is that I also get 9 other not needed documents.
Query:
{"query": {"term": {"_id": "506GBBO25953J"}}}
Results:
grep "_id" /tmp/dump
"_id" : "506GBBO25953J",
"_id" : "404DDCN87823H",
"_id" : "182JNYT51862G",
"_id" : "928NSDK72999J",
"_id" : "880RFWM18773C",
"_id" : "963WLQD56637O",
"_id" : "042BRRR44674H",
"_id" : "905SWQI56804W",
"_id" : "776DUXN15235Y",
"_id" : "723CJRP41700R",
Also I tried bool query for a field in _source
, same result.
{"query": {"bool": {"filter": [{"term": {"ID": "506GBBO25953J"}}]}}}
Why is that? How to return only one document?