Rank 1: Thread
I have a collection of around 10000 items. I need to query a document with the following criterion : Give me a document whose reference attribute is not present in this list.
This, I can do with "notequal" method. Here is my question : this condition will be true of many documents : how can I do it so that it doesn't always give me the first document, I kinda need it to pick "randomly" among the 10000... not the first one. Is there a way ? Or do I have to retrieve ALL documents and then shuffle it locally ?