We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As requested: copied from slack channel
Seeing a weird issue with faceting: if I use a range facet combined with a filter_by, the facet values are not returned for the ranges:
collection creation:
{ "name": "simplefaceting_default_products", "fields": [ { "name": "name", "type": "string", "facet": false, "sort": true }, { "name": "brand", "type": "string", "facet": true, "sort": false }, { "name": "price", "type": "float", "facet": true, "sort": false } ] }
importing some docs:
{"id":"pd-1","name":"Keyboard","brand":"Logitech","price":49.99} {"id":"pd-2","name":"Mouse","brand":"Logitech","price":29.99}
searching:
{ "searches": [ { "collection": "simplefaceting_default_products", "q": "*", "filter_by": "brand:=Logitech", "sort_by": "name:asc", "facet_by": "brand,price(Low:[0, 30], Medium:[30, 75], High:[75, ])", "max_facet_values": 100 } ] }
results - facet values for price are not returned:
{ "results": [ { "facet_counts": [ { "counts": [ { "count": 2, "highlighted": "Logitech", "value": "Logitech" } ], "field_name": "brand", "sampled": false, "stats": { "total_values": 1 } }, { "counts": [], "field_name": "price", "sampled": false, "stats": { "avg": 39.99000072479248, "max": 49.9900016784668, "min": 29.989999771118164, "sum": 79.980001449584961, "total_values": 0 } } ], "found": 2, "hits": [ { "document": { "brand": "Logitech", "id": "pd-1", "name": "Keyboard", "price": 49.99 }, "highlight": {}, "highlights": [] }, { "document": { "brand": "Logitech", "id": "pd-2", "name": "Mouse", "price": 29.99 }, "highlight": {}, "highlights": [] } ], "out_of": 2, "page": 1, "request_params": { "collection_name": "simplefaceting_default_products", "first_q": "*", "per_page": 10, "q": "*" }, "search_cutoff": false, "search_time_ms": 7 } ] }
searching without the filter:
{ "searches": [ { "collection": "simplefaceting_default_products", "q": "*", "sort_by": "name:asc", "facet_by": "brand,price(Low:[0, 30], Medium:[30, 75], High:[75, ])", "max_facet_values": 100 } ] }
results - facet values for price are returned:
{ "results": [ { "facet_counts": [ { "counts": [ { "count": 2, "highlighted": "Logitech", "value": "Logitech" } ], "field_name": "brand", "sampled": false, "stats": { "total_values": 1 } }, { "counts": [ { "count": 1, "highlighted": "", "value": "Low" }, { "count": 1, "highlighted": "", "value": "Medium" } ], "field_name": "price", "sampled": false, "stats": { "avg": 39.99000072479248, "max": 49.9900016784668, "min": 29.989999771118164, "sum": 79.980001449584961, "total_values": 2 } } ], "found": 2, "hits": [ { "document": { "brand": "Logitech", "id": "pd-1", "name": "Keyboard", "price": 49.99 }, "highlight": {}, "highlights": [] }, { "document": { "brand": "Logitech", "id": "pd-2", "name": "Mouse", "price": 29.99 }, "highlight": {}, "highlights": [] } ], "out_of": 2, "page": 1, "request_params": { "collection_name": "simplefaceting_default_products", "first_q": "*", "per_page": 10, "q": "*" }, "search_cutoff": false, "search_time_ms": 5 } ] }
Typesense Version: 26.0
OS: testcontainers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
As requested: copied from slack channel
Seeing a weird issue with faceting: if I use a range facet combined with a filter_by, the facet values are not returned for the ranges:
collection creation:
importing some docs:
searching:
results - facet values for price are not returned:
searching without the filter:
results - facet values for price are returned:
Metadata
Typesense Version: 26.0
OS: testcontainers
The text was updated successfully, but these errors were encountered: