#community-help

Efficiently Retrieving Facets in Typesense

TLDR Todd asked if using an empty string for include_fields returns facets. Jason and Dan suggested using 0 for per_page to limit results.

Powered by Struct AI

1

1

1

5
16mo
Solved
Join the chat
Jul 06, 2022 (16 months ago)
Todd
Photo of md5-cccf0b87668408fef09dd77e1948fced
Todd
05:37 PM
Hey all, is it possible to just get back facets by using an empty string for include_fields or something like that?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:54 PM
In addition to include_fields, you can also set per_page to say 1 (not sure if 0 will work)

1

Todd
Photo of md5-cccf0b87668408fef09dd77e1948fced
Todd
05:55 PM
Oh wow! I set it to a million because I thought I needed all results back 😆
Jul 07, 2022 (16 months ago)
Dan
Photo of md5-f8f7b04dda4a09dec991cdc07f4d9c64
Dan
12:26 PM
0 for per_page works fine - at least on 0.23.

1

1

12:27
Dan
12:27 PM
(am doing this to get the multi_search results as discussed here) !