FT.SEARCH sortby document id

Hi everyone, is it possible to sort the result of a FT.SEARCH by the document id? It seems that the default sorting is by document insertion time… how can I sort by the document id instead?
The SORTBY clause doesn’t seem to help in this case.

Thanks!

The only way to do it currently is to add the document id as a field in the document, and then you can sort by it. We are planning to allow access the document id during aggregation and then you will be able to sort by it. But it will only be possible in future versions.

2 Likes

Thanks for your reply.