Querying Empty Strings in Typesense Cloud - Collection Search
TLDR Loic wanted to query empty strings in Typesense, but Jason explained this needs to be done when indexing as Typesense doesn't support querying blank keys.
Powered by Struct AI
4
14mo
Oct 08, 2022 (15 months ago)
Loic
Loic
03:29 PMHey guys,
In Typesense cloud - Collection search
How can I find if a parameter is equal to empty string?
(doc link is broken https://github.com/typesense/typesense/issues/749)
In Typesense cloud - Collection search
How can I find if a parameter is equal to empty string?
(doc link is broken https://github.com/typesense/typesense/issues/749)
Oct 10, 2022 (14 months ago)
Jason
Jason
01:49 PMTypesense doesn’t support querying for null or blank keys, since the index only includes words. As a workaround, you’d need to create a new boolean field in each record and set it to true or false, depending whether your other field is blank or has a value
Loic
Loic
03:18 PMI would actually need to query empty string to detect error/mistakes in the dataset
Jason
Jason
04:16 PMYou would have to do this at indexing time unfortunately.
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 3015 threads (79% resolved)
Similar Threads
Querying Null and String Values in Typesense.
Andrew wondered if they could look for non-null and string values in Typesense, but Jason explained a workaround by creating a new boolean field at indexing time.
2
10mo
Resolving Algolia Filter Issue with Empty/Null Strings
Mateo was struggling with a filtering error when dealing with empty/null strings in Algolia. Upon Jason's suggestion, they changed empty values to "Unknown" and exported the documents to resolve the issue.
9
10mo
Handling Empty Searches in Typesense
Ahmed inquired about Typesense's handling of empty searches. Jason explained the default behavior and suggested controlling the ranking using sort_by.
4
24mo