#Is it possible to get a random document?

10 messages · Page 1 of 1 (latest)

prime radish
#

i want to randomise

wild fieldBOT
lean bane
#

Then use req.payload with the local API, get totalDoc count, then do something creative with pagination/limit.

#

Maybe limit: 1 and page: randomIntInTotalDocRange

#

Is it possible to get a random document?

prime radish
#

i am trying to get random documents in batches and would want to not less repeated documents. just like instagram reels

undone marlin
#

So the batches themselves should be de-duped?

merry spoke
#

Is this still the best way to do it? 🙂 Shouldn't something like sort: 'RANDOM()', be a nice thing?

undone marlin
#

You could make a feature request on the repository to add that!