I need to return only the facet counts from solr. So I basically want to search over all documents and return the facet counts, but I don't want to return any search results. Is this possible?
Thanks
Faceted search is the dynamic clustering of items or search results into categories that let users drill into search results (or even skip searching entirely) by any value in any field. Each facet displayed also shows the number of hits within the search that match that category.
SOLR-6329) Pivot Faceting (whether distributed or not) only supports faceting on field values (SOLR-6353) Distributed Pivot Faceting may not work well with some custom FieldTypes. ( SOLR-6330) Using facet.* parameters as local params inside of facet.field causes problems in distributed search. (
Facet queries: These allow you to generate a facet based on a certain value using a lucene syntax query. It's usually used for numeric ranges or for faceting based on a certain value: facet.query=price:[1 TO 100]
Setting facet=true
will enable faceting and setting rows=0
will prevent any results being returned. Conveniently the numFound
will show you how many results were found.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With