{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/16076","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16076/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16076/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16076/events","html_url":"https://github.com/elastic/elasticsearch/issues/16076","id":127385942,"number":16076,"title":"Sorting by _id field is bouncing","user":{"login":"serj-p","id":2565455,"avatar_url":"https://avatars.githubusercontent.com/u/2565455?v=3","gravatar_id":"","url":"https://api.github.com/users/serj-p","html_url":"https://github.com/serj-p","followers_url":"https://api.github.com/users/serj-p/followers","following_url":"https://api.github.com/users/serj-p/following{/other_user}","gists_url":"https://api.github.com/users/serj-p/gists{/gist_id}","starred_url":"https://api.github.com/users/serj-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serj-p/subscriptions","organizations_url":"https://api.github.com/users/serj-p/orgs","repos_url":"https://api.github.com/users/serj-p/repos","events_url":"https://api.github.com/users/serj-p/events{/privacy}","received_events_url":"https://api.github.com/users/serj-p/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-19T07:53:12Z","updated_at":"2016-01-20T12:11:38Z","closed_at":"2016-01-20T12:11:38Z","body":"I have a problem with consistency of ES sorting. When I order for example by date, ES gives different orderings from one query to another because of duplicate dates. To fix this we usually perform sorting by date + sorting by _id, which meant to be unique, but it isn't. Sorting by _id field only acts the same, it is bouncing. We have config of ES 1.4.1, 1 shard + 1 replica per index. When I disable replica it seems that sorting bouncing stops. "},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/173185393","html_url":"https://github.com/elastic/elasticsearch/issues/16076#issuecomment-173185393","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/16076","id":173185393,"user":{"login":"clintongormley","id":56599,"avatar_url":"https://avatars.githubusercontent.com/u/56599?v=3","gravatar_id":"","url":"https://api.github.com/users/clintongormley","html_url":"https://github.com/clintongormley","followers_url":"https://api.github.com/users/clintongormley/followers","following_url":"https://api.github.com/users/clintongormley/following{/other_user}","gists_url":"https://api.github.com/users/clintongormley/gists{/gist_id}","starred_url":"https://api.github.com/users/clintongormley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintongormley/subscriptions","organizations_url":"https://api.github.com/users/clintongormley/orgs","repos_url":"https://api.github.com/users/clintongormley/repos","events_url":"https://api.github.com/users/clintongormley/events{/privacy}","received_events_url":"https://api.github.com/users/clintongormley/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T12:11:38Z","updated_at":"2016-01-20T12:11:38Z","body":"Correct - the `_id` field is neither indexed nor stored by default.  You will see that its entry in the `sort` array is `null`.  You can sort on `_uid` instead."}}