We're updating the issue view to help you get more done. 

Document that it's not recommended to sort on the id field

Description

In the Lucene backend, sorting on the id field leads to erratic behaviors (random sorting).

In the Elasticsearch backend, when we sort by the id field, we use the _uid field to sort. The _uid field is defined as type#id so the behavior is not satisfactory when you query multiple times. Not that it's the best we can do as the _id field is not indexed and can't be used for sorting.

So we'd better recommend staying away from the id field for sorting.

Environment

None

Status

Assignee

Guillaume Smet

Reporter

Guillaume Smet

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major