Yes, the _id field is a string. You are not limited to numbers. In fact, an
automatically generated ID has many non-numeric characters in it.
For what you want, you should create an id field, map it to a long integer,
and then copy your _id into that id field when you load the document. Then
wh
... can it be that _id is treated as string? If so, is there any way
retrieve the max _id field with treating _id as integer?
Am Dienstag, 27. Januar 2015 19:24:41 UTC+1 schrieb Abid Hussain:
>
> Hi all,
>
> I want to determine the doc with max and min _id value. So, when I run
> this query:
> G
Hi all,
I want to determine the doc with max and min _id value. So, when I run this
query:
GET /my_index/order/_search
{
"fields": [ "_id" ],
"sort": [
{ "_uid": { "order": "desc" } }
],
"size": 1
}
I get a result:
{
...
"hits": {
...
"hits": [
{