I ran into an issue where I used FQL to shape my returning data the way I wanted, however, I needed to return that data sorted by a value back to the client. I sat and tried to use every method in FQL that I could to achieve this but to no avail. I don’t actually believe sorting with FQL is even possible at this point. I know indexes can be sorted, but I don’t believe that an index can be used for the logic I had to make in my UDF. The only option I had in this case was to return the array of objects back to the client and sort from the client. Obviously this is not ideal because it gets rid of the possibility of pagination. It also goes against the point of using Fauna which is to do most of the backend logic using FQL. A native version of Sort would be great to be able to solve this problem.
Here is the original post that lead me to this conclusion How to sort or rank fuzzy logic Ngrams search by most relevant result