Grouping by Optional Field in Documents
TLDR Adrian asked about the behavior of group-by on optional fields. Kishore Nallan confirmed that documents without the field would form individual groups.
Powered by Struct AI

2
4mo
Solved
May 10, 2023 (4 months ago)
Adrian
Adrian
10:52 PMIs it possible to group-by an optional field? If so what is the expected behavior for documents that don't have the field. Would they each be considered their own group?
May 11, 2023 (4 months ago)
Kishore Nallan
Kishore Nallan
03:21 AMYes documents without a value will be on their own group.

Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 2764 threads (79% resolved)
Similar Threads
Understanding group_by with Multiple Fields
Magnus asked about using `group_by` with multiple fields. Jason explained it with an example of product size and color.
3
15mo
Solved
Filtering Documents by Empty String
Serezha asked if it is possible to filter documents by empty string; Kishore Nallan informed that it is not possible as they do not store references to empty values.
2
7mo
Solved
Non-Indexable Fields Enforced as Optional: Reasoning and Revisions
Sai asked about the enforcement of non-indexable fields being optional. Kishore Nallan informed them of the unclear historical basis and requested they create a tracking issue on GitHub for investigation.
5
12mo
Solved