#community-help

Query on Using Typesense's Facet_by Search Parameter

TLDR Yoann asked how to use typesense's facet_by parameter. Jason suggested using widgets like refinementList and menu, and shared a link to the Menu connector. Yoann agreed to try this solution.

Powered by Struct AI
+11
8
9mo
Solved
Join the chat
Dec 22, 2022 (9 months ago)
Yoann
Photo of md5-949f018f94fc2432eeec74b4c51e0aaa
Yoann
11:02 AM
Hey !
Has anyone managed to use the facet_by search parameter from the typesense-instantsearch-adapter ?
I've tried a few things but the requests contains an empty ("") facet_by parameter
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:47 PM
Facet by is handled by instantsearch through all the filter widgets like refinementList, menu, etc. so you shouldn’t have to set it manually
02:48
Jason
02:48 PM
Could you elaborate on what your use case is?
Yoann
Photo of md5-949f018f94fc2432eeec74b4c51e0aaa
Yoann
03:04 PM
I might be mis-using the library 😅
I'm exploring the possibilities and my first intent was to get the facet_counts for a subset of faceted fields and display them somehow to the user as they type. I wasn't planning to refine the search so I thought refinementList wasn't for me yet
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:15 PM
I see, then you would have to build a custom widget may be based off of the Menu widget and remove the ability to click from it
03:15
Jason
03:15 PM
And then the underlying Menu connector will take care of setting facet_by
Yoann
Photo of md5-949f018f94fc2432eeec74b4c51e0aaa
Yoann
03:32 PM
Ok, thank you very much, will try to use menu and / or refinementList
+11