Understanding group_by with Multiple Fields
TLDR Magnus asked about using group_by
with multiple fields. Jason explained it with an example of product size and color.
Powered by Struct AI
3
16mo
Solved
Jun 29, 2022 (16 months ago)
Magnus
Magnus
06:51 PMA related question. How does group_by work with multiple fields? I cannot wrap my head around how that works, and I cannot seem to find a good example.
Jason
Jason
06:52 PMIf you do
group_by=size,color
for eg, products having each permutation of color and size will be placed in separate groups06:53
Jason
06:53 PMSo for eg, the groups would be
small-blue, medium-blue, large-blue
small-brown, medium-brown, large-brown
small-black, medium-black, large-black
etc
small-blue, medium-blue, large-blue
small-brown, medium-brown, large-brown
small-black, medium-black, large-black
etc
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 2779 threads (79% resolved)
Similar Threads
Grouping Product Variants in Search Parameters
Alessandro was inquiring about selecting a specific product variant when grouping by model. Kishore Nallan clarified that there is no way to set an additional selection criteria.
3
15mo
Solved
Discussing OR conditions function feature
Dan asked about filtering with OR conditions and was informed by Kishore Nallan that the feature is not yet available but will be in two weeks.
3
12mo
Solved
Grouping by Optional Field in Documents
Adrian asked about the behavior of group-by on optional fields. Kishore Nallan confirmed that documents without the field would form individual groups.
2
5mo
Solved