Book Image

Scaling Apache Solr

By : Hrishikesh Vijay Karambelkar
Book Image

Scaling Apache Solr

By: Hrishikesh Vijay Karambelkar

Overview of this book

Table of Contents (18 chapters)
Scaling Apache Solr
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Improving runtime search for Solr


To speed up the querying and rendering of results, it is important to optimize the runtime of Apache Solr. The optimization of Solr runtime can be achieved in various ways, which will be discussed shortly.

Pagination

A typical search screen provides results on a single page with pagination. Apache Solr provides support for pagination at the search level, thereby enabling search responses. When Solr fetches results for the queries passed by the user, Apache Solr allows users to limit the fetching of the result to a certain number by specifying the rows attribute in the search queries. For example, the following query will return 10 rows of results from 10 to 20:

q=Sudarshan&rows=10&start=10

The pagination parameters can also be specified in solrconfig.xml as queryResultWindowSize. By having a minimum page size, the response of a search over Apache Solr becomes fast, since it does not have to wait until all results are captured.

Reducing Solr response footprint...