How can I see the version number of an indexed document when searching?

Hi,

How can I see the version number of an indexed document when searching?

e.g. the result in

curl -XGET 'http://localhost:9200/twitter/tweet/_search' -d '{
"query" :{"match_all": {} } }'

does not contain the version number?

I'm using elasticsearch version 0.20.4

Thanks!

Sandy

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ask it to return the version. For example:

{
"from" : 0,
"size" : 20,
"query" : {
"match" : {
"words" : {
"query" : "doctor",
"type" : "boolean"
}
}
},
"version" : true,
"explain" : false,
"fields" : [ "_ttl", "_source" ]
}

Hope this helps!

(Note: I also as it to return the _ttl and _source fields. ES normally
returns the _source, but if you explicitly ask it for another field then
you also need to explicitly ask it for _source too.)

Regards,
Brian

On Friday, May 17, 2013 8:26:42 AM UTC-4, Sandy Van den Borne wrote:

Hi,

How can I see the version number of an indexed document when searching?

e.g. the result in

curl -XGET 'http://localhost:9200/twitter/tweet/_search' -d '{
"query" :{"match_all": {} } }'

does not contain the version number?

I'm using elasticsearch version 0.20.4

Thanks!

Sandy

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.