Chapter 4. Configuring Solr


This chapter covers

  • Handling a query request
  • Extending query processing with search components
  • Managing and warming searchers
  • Managing cache behavior

Up to this point, you’ve taken much of what has been presented on faith, without learning how Solr works. We’ll change that in this chapter and the next by learning how Solr is configured and how configuration settings impact Solr’s behavior. As you’ll see, Solr’s configuration can be daunting at first look because the configuration file for the example server contains almost every possible configuration setting in Solr. Our main focus in this chapter is to introduce the most important configuration settings for Solr, particularly those that impact how Solr processes requests from client applications. The knowledge you gain in this chapter will be applied throughout the rest of the book. After reading this chapter, you’ll have a firm understanding of how queries are executed in the Solr server.

As we learned in chapter 2, Solr works out of the box without requiring any configuration changes. But at some point, you’re going to need to optimize Solr for your specific search-application requirements. Broadly speaking, most of the configuration you’ll do with Solr focuses around three main XML files:

4.1. Overview of solrconfig.xml

4.2. Query request handling

4.3. Managing searchers

4.4. Cache management

4.5. Remaining configuration options

4.6. Summary