I use a query dsl like:

{
  "filter": {
    "exists": { "field": "info" }
  },
  "sort": { "_id": "desc" }
}

And the "_id" here is an integer like '123'.

But the result is like:

{ 
  "took": 50,
  ...
  "hits": {
    ...
    "hits": [
      {
        ...
        "sort": [ null ]
      }]
  }
}

Also, I've tried to add "_id": { "index": "not_analyzerd" } in the _mapping.
This time the "sort" section returns values. But I find the results are 
still partly unordered.

Can I sort results by _id? How?

Thank you.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4ea45f18-847a-4b58-b78e-ddcd9ee1e9f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to