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

A quick example – faceting release types


Observe the following search results. The echoParams parameter is set to explicit (defined in solrconfig.xml) so that the search parameters are seen here. This example is using the default lucene query parser. The dismax query parser is more typical, but it has no bearing on these examples. The query parameter q is *:*, which matches all documents. In this case, the index only has releases, so there is no need to apply filters. Filter queries are used in conjunction with faceting a fair amount, so be sure you are familiar with them; see Chapter 5, Searching. To keep this example brief, we set rows to 2. Sometimes when using faceting, you only want the facet information and not the main search, so you would set rows to 0.

{"responseHeader":{
  "status":0,
  "QTime":3,
  "params":{
    "facet":"true",
    "f.r_official.facet.method":"enum",
    "f.r_official.facet.missing":"true",
    "facet.field":"r_official",
    "fq":"type:Release",
    "fl":"r_name...