#community-help

Using String* Field as Facet Field in Typesense

TLDR Johnny asked about using a string* field as a facet field in Typesense. Jason provided an alternative solution.

Powered by Struct AI

1

3
2mo
Solved
Join the chat
Sep 18, 2023 (2 months ago)
Johnny
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Johnny
05:33 AM
Hi everyone, I wondering is it possiable to use a string* field as facet field, such as I have a multi-value field called productType, and one product will contains serveral types, I use string* as its field type and put ["a","b","c"] as its value. but finnally I only get 1 facet called "["a","b","c"]" but no "a", "b", "c". Does someone have some experience with it, thanks a lot in advance!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:23 PM
This is not possible to do in Typesense.

Instead of an array of values, you could create a field with a-b-c and facet on that
Sep 19, 2023 (2 months ago)
Johnny
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Johnny
01:25 AM
thank you!

1