Customizing Multi Search API Response
TLDR gab inquired about customizing the search response to only display "facet_counts". Kishore Nallan provided a solution - setting per_page=0
.
Oct 12, 2021 (27 months ago)
gab
06:40 AMI would like to stripe out the "hits" property and to keep only the "facet_counts" property in the response.
Here is the current parameters I'm sending to the multi_search api
{
"searches": [
{
"query_by": "name, canton",
"collection": "warehouses",
"q": "",
"facet_by": "canton",
"filter_by": ""
}
]
}
Kishore Nallan
06:41 AMper_page=0
gab
06:43 AMKishore Nallan
06:43 AMTypesense
Indexed 3011 threads (79% resolved)
Similar Threads
Typesense Facet Query Issue and Resolution
Stefan wanted to have typesense return count: 0 for filtered out facets, which was not supported. They shared a workaround using a server data call. The solution involved adding "facets: [this.filterConfig.attribute]," for the server adapter to work. Kishore Nallan acknowledged the resolution.
Understanding Facet Results in Typesense
Prabhu had difficulty understanding the count results of his facet results in Typesense. Kishore Nallan explained the behaviour and suggested creating a Github issue for a feature request to modify count behaviour.
Hiding Exact Hits Number in Typesense and Utilizing `out_of` Field
A sought a way to hide exact hits count in Typesense. Kishore Nallan clarified about the `out_of` field, its future use, and suggested using `found` for scrolling. Jason offered a solution to hide the count by modifying the item template.