Book Image

Apache Solr Search Patterns

By : Jayant Kumar
Book Image

Apache Solr Search Patterns

By: Jayant Kumar

Overview of this book

Table of Contents (17 chapters)
Apache Solr Search Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using BRS queries instead of DisMax


Now that we know the internals of how DisMax queries work and how scoring happens in Solr, let's look at creating our own query syntax and parser for customizing our search. The question here is what is missing in eDisMax. Note that eDisMax provides a simple search syntax where we do not have to worry about the fields and the results are sorted by relevance. However, suppose the requirement is exactly opposite. The end user is an advanced user who knows the fields and what he or she is searching for. One such example is a search involving patents. The syntax for such a search is specified by BRS. In addition to Fielded and Boolean search, BRS also provides a proximity search with clauses such as SAME (in the same paragraph), WITH (in the same sentence), ADJ (adjacent with order), and NEAR (adjacent without order), along with parenthetical grouping. An example of a BRS query is as follows:

((galaxy ADJ samsung) SAME note) AND (mobile OR tablet)

BRS provides...