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 seems weird to use this to sort instead of '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.
|
|