Closed dburles closed 7 years ago
Are you using mongo version above 2.6.x? I think easysearch uses the $or
hack to get a sorted document list based on a sorted list of ids. This will not work for newer versions of mongo. Here's the issue over at mongo.
@bompi88 yeah that definitely sounds plausible
It's really a rather bad hack and I didn't get around any solution that we could replace it with right now.
@matteodem A tought: is it possible to use aggregations to achieve this, like in Aaron Staple's post, if it is combined with the reactive aggregation package jcbernack:reactive-aggregate?
Yeah might be, I'll investigate this when I have time for it
Please comment here if this still is a problem. The core code should catch edge-cases for sort ordering when documents are changed.
Been digging into this one for a few hours today, not sure exactly the root cause but the order that the results are displayed do not seem to match the sort provided (have also tested on other fields). The results that I do see are close to being ok in that they are mostly correct (perhaps this is why it might be a bug that's gone unnoticed).
Running the same sort using curl returns the results in the correct order, so it's definitely not an indexing issue.
Might this be a bug in the package or something else?