Understanding Search Query's `facet_by` Implementation
TLDR Subas inquired about facet_by
while making a search query and received clarifications from Jason. Issue not fully solved as further discussion is needed.
Oct 05, 2023 (2 months ago)
Subas
01:16 PMfacet_by
then whatever facet_counts i am getting is based on per_page ? how i can get whole facets count for the search query. and if my response for search is like this "facet_counts": [
{
"counts": [
{
"count": 8,
"highlighted": "eCommerce",
"value": "eCommerce"
},
{
"count": 2,
"highlighted": "Logistics and Supply Chain",
"value": "Logistics and Supply Chain"
}
],
"field_name": "industry_category",
"sampled": false,
"stats": {
"total_values": 2
}
}
],
how i can get all 8 documents for eCommerce facets.............( I tried filter_by also but it is giving me different results. since eCommerce having 8 facets count but if i filter than i am getting more than 8 results .... ) can anyone help me out for this Thank you !
Jason
06:06 PMwhatever facet_counts i am getting is based on per_page ?This is not the case.
Facets are always on the full resultset, unrelated to pagination
Jason
06:08 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
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.
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.
Discussing Indexing and Filter Applications
Tugay and Kishore Nallan debated over latest RC build progress with several queries about field definitions and effect of filters on performance. A bug concerning multiple document matches was discovered and fixed.