TLDR Ahmed inquired about Typesense's handling of empty searches. Jason explained the default behavior and suggested controlling the ranking using sort_by.
Hello, how does Typesense with empty searches? Does it simply return the entire collection sorted by date added? Is there any way I can alter how it deals with empty searches?
By default, for `*` queries, Typesense will sort by the default sorting field if one is mentioned in the collection, otherwise it will fall back to the document insertion order
You can control the ranking using sort_by
More info here:
Indexed 3051 threads
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI