Is there a way to get x random documents from a co...
# community-help
a
Is there a way to get x random documents from a collection? I can only think of unsexy solutions
j
Hey Alexander! There's no direct way to do this...
a
ok 😄 I saw tht in the docs, I am trying to find a work around
Tanks for the reply Jason
j
I guess one way would be to have a random integer field in every record, then filter by a random numeric range on that field and take the first 10 docs?
a
yea that's what I was thinking too
this is my work around for now :)
Copilot says you are wrong 😆
😂 1