Retrieving Random Documents from a Collection
TLDR Alexander asked for ways to retrieve random documents from a collection. Jason advised using a random integer field in all records, and filtering using a random numeric range to get the documents.
Apr 06, 2022 (21 months ago)
Indexed 3015 threads (79% resolved)
Querying Fields in Random Order in a Collection with Typesense
Andrew asked if it was possible to query fields in a random order with Typesense. Jason explained that this feature isn't currently available but is being tracked within a GitHub issue and provided a workaround.
Fetching Random Documents Using Random Integer
em1nos inquires about fetching random documents, to which Jason confirms using a random integer is the method. Suggestion for new "random" sort order feature in Typesense was advised to be directed towards Github.
Retrieving All Documents in a Collection with Pagination
ohm was seeking to retrieve all documents of a collection with pagination, without filters. Kishore Nallan suggested a wildcard search.
Deleting All Documents with Filter_by
Mischa wants to delete all documents using `id:*` filter but encounters issues. Jason suggests a workaround and advises creating a GitHub issue for the desired feature.
Random Selection from Typesense Data
John wants to return a random selection from a typesense data set. Kishore Nallan and CaptainCodeman suggest methods, but John still struggles to get the desired result.