solr faceted search - how do I specify multiple fields on the Solr Query UI?

Chetya picture Chetya · Jun 13, 2013 · Viewed 30.1k times · Source

I'm a newbie to solr and tying my hands at solr. Can some one here please explain how to specify multiple facet fields for a given search.

I'm using the Solr Admin UI/ query ink and it allows me to specify only one field. I would however like to facet on multiple fields like region industry stock-exchange etc on my company search.

I have gone through the solr wiki and relevant doc links like the one below http://docs.lucidworks.com/display/solr/Query+Screen

but none of them seem to explain how to specify multiple fields. I want to build something like the usual Amazon/Walmart etc search ui that provides multiple facets and counts when trying to search for a product on my planned cmpany search page.

Answer

Mikael Engver picture Mikael Engver · Jan 24, 2014

You can query multiple facet fields. Just write with the syntax:

.../select?q=&facet=true&facet.field=<field1>&facet.field=<field2>