Book Image

Apache Solr High Performance

By : Surendra Mohan
Book Image

Apache Solr High Performance

By: Surendra Mohan

Overview of this book

Table of Contents (14 chapters)

Function queries


A function query can be defined as a user-specified Solr function that is usually mathematical in nature and is supported by dismax, edismax, and other standard query parsers. It enables you to generate a relevancy score based on the actual value of one or more numeric fields. Since function queries are technical, they are so robust that they can be used in instances where the queries' context comes into picture. The instances include searching, filtering, faceting, sorting, and so on.

Now, we will understand a few of the ways by which we can incorporate a function query into our Solr instance. They are as follows:

  • The dismax query parser (the bf and boost parameters): As we already discussed earlier in this chapter, the bf and boost parameters boost the user query score by adding or multiplying the function query. In the upcoming section, we will learn how to derive a function query in depth using a few examples.

  • The boost query parser: Unlike the boost parameter in dismax...