Difference between Solr Facet Fields and Filters

I use SolrMeter to test the Apache Solr search engine. The difference between Facet fields and filters is unclear to me. The SolrMeter tutorial lists this as a Facet field heading:

content category fileExtension 

and this is an example of filter requests:

 category:animal category:vegetable categoty:vegetable price:[0 TO 10] categoty:vegetable price:[10 TO *] 

It’s hard for me to wrap my head around me. Can someone explain with an example? Can I use SolrMeter without specifying facets or filters?

+7
source share
2 answers

Facet fields are used to obtain statistics about returned documents - in particular, for each value of this field, the number of returned documents has this value for this field. So, for example, if you have 10 products matching the query "soft carpet", if you border on "origin", you can get 6 documents for Oklahoma and 4 for Texas. A facet field query will give you numbers 6 and 4.

Filtering queries, on the other hand, are used to filter the returned results by adding another constraint. It should be remembered that a query when using filtering results does not affect the assessment or relevance of documents. For example, you can search your index for a product, but just want to return results limited to a geographic area or something.

+13
source

An aspect is a field (type) of a document, so a category is a field. As Ansari said, faces are used to get statistics and provide grouping capabilities. You can apply grouping in the category field to show all vegetable as one group.

Edit: The parts associated with a search within a specific field are incorrect. He will not search only in the field. This should be "adding a search term".

Fulfilling a category:vegetable filter query will search for vegetable in the category field and other fields of the document. It is used to search only specific fields, and not for each field. Sometimes you know that you need this term in only one field, so you can only search for one field.

+2
source

All Articles