Chapter 11. Lucene administration and performance tuning

 

This chapter covers

  • Tuning for performance
  • Effectively using threads
  • Managing disk, file descriptors, memory usage
  • Backing up and restoring your index
  • Checking an index for corruption and repairing it
  • Understanding common errors

You’ve seen diverse examples of how to use Lucene for indexing and searching, including many advanced use cases. In this chapter we cover the practical, hands-on administrative aspects of Lucene. Some say administrative details are a mundane and necessary evil, but at least one of your beloved authors would beg to differ! A well-tuned Lucene application is like a well-maintained car: it will operate for years without problems, requiring only a small, informed investment on your part. You can take pride in that! This chapter gives you all the tools you need to keep your Lucene application in tip-top shape.

Lucene has great out-of-the-box performance, but for some demanding applications, this is still not good enough. Fear not! There are many fun ways to tune for performance. Adding threads to your application is often effective, but the added complexity can make it tricky. We’ll show you some simple drop-in classes that hide this complexity. Most likely you can tune Lucene to get the performance you need. We’ll explore using hands-on examples for measuring performance.

11.1. Performance tuning

11.2. Threads and concurrency

11.3. Managing resource consumption

11.4. Hot backups of the index

11.5. Common errors

11.6. Summary