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

The DisMax query parser – part 2


In the previous chapter, you were introduced to the dismax query parser as the preferred choice for user queries. The parser for user queries is set with the defType parameter. The syntax, the fields that are queried (with boosts)—qf, the min-should-match syntax—mm, and the default query—q.alt, were already described. We're now going to cover the remaining features: the ones that most closely relate to scoring.

Note

Any mention herein to dismax applies to the edismax query parser too, unless specified otherwise. As explained in the previous chapter, edismax is the extended DisMax parser. It is generally superior to dismax, as you'll see in the upcoming section.

Lucene's DisjunctionMaxQuery

The ability to search across multiple fields with different boosts in this query parser is a feature powered by Lucene's DisjunctionMaxQuery query class. Let's start with an example. If the query string is simply rock, then DisMax might be configured to turn this into a DisjunctionMaxQuery...