Chapter 5. Near Real-time Searching

These are the recipes we are going to cover in this chapter:

  • Using the DirectoryReader to open index in Near Real-time
  • Using the SearcherManager to refresh IndexSearcher
  • Generational indexing with TrackingIndexWriter
  • Maintaining search sessions with SearcherLifetimeManager
  • Performance tuning: latency and throughput

Introduction

In some search applications, it may be necessary to immediately expose any changes made to the index to attain the best user experience. For example, such applications can be forums where a user may search for his/her newly edited post to confirm that the submission is successful and see how it ranked in the search results. If the application is database-backed, post-edit searches will always ...

Get Lucene 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.