Book Image

Apache Solr Enterprise Search Server - Third Edition

By : David Smiley, Eric Pugh, Kranti Parisa, Matt Mitchell
Book Image

Apache Solr Enterprise Search Server - Third Edition

By: David Smiley, Eric Pugh, Kranti Parisa, Matt Mitchell

Overview of this book

<p>Solr Apache is a widely popular open source enterprise search server that delivers powerful search and faceted navigation features—features that are elusive with databases. Solr supports complex search criteria, faceting, result highlighting, query-completion, query spell-checking, relevancy tuning, geospatial searches, and much more.</p> <p>This book is a comprehensive resource for just about everything Solr has to offer, and it will take you from first exposure to development and deployment in no time. Even if you wish to use Solr 5, you should find the information to be just as applicable due to Solr's high regard for backward compatibility. The book includes some useful information specific to Solr 5.</p>
Table of Contents (19 chapters)
Apache Solr Enterprise Search Server Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Pivot faceting


Pivot facets enable Solr to return facet counts across sets of fields. This means that the facet results are multi-level, where each level is a different Solr field. Pivot facets are great for hierarchical or tree faceting.

Tip

Pivot facets are not supported in distributed mode until Solr 4.10.

Pivot faceting is simple to use. The feature itself introduces only two new parameters:

  • facet.pivot: This field is similar to facet.field, but instead of giving it a single field, it expects an ordered comma-delimited list of fields. Each field is recursively faceted from the field listed before it in the list.

  • facet.pivot.mincount: This is similar to facet.mincount, but only for pivot facets. The default value is 1.

It's important to know that the facet.pivot parameter only accepts field names. It won't handle functions, for example. Additionally, the facet.pivot parameter can be specified multiple times.

Time for an example! Let's query the mbtracks core to show artist name, release name...