Facetting Field Inside Object Array in GH Issue
TLDR Michael enquires about faceting fields inside an object array and GH issue. After clarifying facets' syntax and usage, Kishore Nallan explained how to handle the situation, which resolved Michael's issue.
Aug 04, 2023 (4 months ago)
Michael
01:07 PMWhen you search on an object field name, all sub-fields will be automatically searched. Use a dot notation to refer to sub-fields, e.g. person.last_name or person.school.name.
Kishore Nallan Jason ^ maybe add that to the query_by docs ^^
Kishore Nallan
01:07 PMMichael
01:09 PMKishore Nallan
01:10 PMMichael
01:11 PMyou have the
facet => true
thing on a field, but how to tell the facet, that it should only facet e.g. the category title in an objectarray of categories, and not the category description?Kishore Nallan
01:12 PMfacet_by=category.title
Kishore Nallan
01:13 PMfacet => true
on the parent object/object array, define a field specifically with dots in the name e.g. foo.bar.baz
and set that to facet => true
Michael
01:14 PMaddress = object
and then
address.county.title = string
In the TS structure if I get this correctly?
Kishore Nallan
01:32 PMMichael
05:42 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Faceting Objects in Typesense
John wants to facet objects in Typesense, but faces issues. Kishore Nallan suggests creating a feature request on GitHub.
Identifying Names for Faceted Object Arrays
TJ inquires about identifying names in facet results for object arrays. Kishore Nallan explains it's not possible, while John points to a relevant GitHub issue.
Counting Facets within a Nested Object using Filters
Narayan asked how to get facet counts in a nested object, with filtering, and whether you can facet by an object. Jason suggested using `filter_by` and shared new features supporting this.
Faceting issue with Products Collections in Typesense
Carl was unable to facet on a string array. Kishore Nallan and Jason advised ensuring facet counts were being returned and offered to assist in troubleshooting. Issue resolved upon Carl realizing no data was saved in the database.
Updating Collections Strategy and Faceting New Field
Nithin asked about strategies for updating collections and faceting new fields. Kishore Nallan suggested creating another collection, indexing in the background and using aliases to switch live traffic over, and shared details about the upcoming release.