You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be useful to be able to retrieve multiple random docs, limited by a certain amount of documents. By default it should probably be just 5 or something, because it could get somewhat inefficient with a high number of docs. Returned docs should be unique. Order could be random too.
Now that I think about it, wouldn't it make sense to be able to get random entries from a view (instead)?
The text was updated successfully, but these errors were encountered:
Ideas of views are interresting, it would speed a lot the thing in some cases where there is a need to filter results.
having something like:
GET /<db>/_random_doc?filter=_view&view=DName/VName
would works. Difference with the filter is that you can't change it in real time, but it would be definitly faster.
About the limit, the only efficient way I see to that is pre-generating N randoms number where N < number of docs and return random docs in order. I think it could work.
I think it would be useful to be able to retrieve multiple random docs, limited by a certain amount of documents. By default it should probably be just 5 or something, because it could get somewhat inefficient with a high number of docs. Returned docs should be unique. Order could be random too.
Now that I think about it, wouldn't it make sense to be able to get random entries from a view (instead)?
The text was updated successfully, but these errors were encountered: