Is it possible to search documents in Elastic Search index by version? I try this:
curl -XGET eshost:9200/myindex/mytype/_search -d '{query:{match:{_version:"2"}}}'
But it does not work.
I need such a query to get all documents, that have never been updated.
Try using version
Returns a version for each search hit.
{
"version": true,
"query" : {
"term" : { "user" : "kimchy" }
}
}
Unfortunately, you cannot query or filter by _version - the problem is that that field is not indexed, so queries and filters cannot access it:
http://elasticsearch-users.115913.n3.nabble.com/Can-i-filter-query-by-version-td4044331.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With