#community-help

List of Facets in Collection and Version Update

TLDR arif wants to get a list of all facets in a collection. Jason suggests using facet_by: * and clarifies that removing all records with a particular attribute won't remove the field from the schema. Upgrading to the latest version should be scheduled manually.

Powered by Struct AI
8
4mo
Solved
Join the chat
May 25, 2023 (4 months ago)
arif
Photo of md5-e08256d678064813deb604fdf86f0867
arif
11:42 AM
Hi,
I need some suggestions. I need a list of all facets available in a collection. And I have a facet defined by a wildcard like tag.* in the schema. From my observation - if I get a collection via the GET API, I get the current schema which will include facets like tag.something1 , tag.something2. Now my confusions are -
1. is this the proper way to get the list of all current facets?
2. would this approach be feature proof? (I mean if there is any chance to not providing this info via this API)
3. suppose, tag.something1 had only one one record and I have removed it. should I still expect to have facet in the schema?
4. is there any limitation of such dynamic facets? in terms of the number of facets and performance in the future?
Thanks!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:11 PM
In the latest version of Typesense v0.25.0.rc30 you can send facet_by: * and that will return all the available facets
08:12
Jason
08:12 PM
In any case, even if you want to fetch the list of facets from the collection schema, that’s fine too - we don’t plan to change this format and will have it be backward compatible…
08:12
Jason
08:12 PM
But to answer #3, if you remove all records with a particular attribute, that won’t remove the field from the schema
May 26, 2023 (4 months ago)
arif
Photo of md5-e08256d678064813deb604fdf86f0867
arif
08:51 AM
Hi, I have a cluster on TS cloud Typesense v0.24.0. Should I manually update the version somehow? of it will be done automatically?
09:06
arif
09:06 AM
We have submitted a upgrade request already. Now the question is - is it possible to estimate when the next stable release is coming? (assuming rc versions are not stable)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:38 PM
Most of our RC builds are stable and users do use them on production…
04:38
Jason
04:38 PM
We do not automatically update Typesense versions, you would have to schedule them