Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3445

Add SearcherManager, to manage IndexSearcher usage across threads and reopens

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.5, 4.0-ALPHA
    • None
    • None
    • New

    Description

      This is a simple helper class I wrote for Lucene in Action 2nd ed.
      I'd like to commit under Lucene (contrib/misc).

      It simplifies using & reopening an IndexSearcher across multiple
      threads, by using IndexReader's ref counts to know when it's safe
      to close the reader.

      In the process I also factored out a test base class for tests that
      want to make lots of simultaneous indexing and searching threads, and
      fixed TestNRTThreads (core), TestNRTManager (contrib/misc) and the new
      TestSearcherManager (contrib/misc) to use this base class.

      Attachments

        1. LUCENE-3445.patch
          94 kB
          Michael McCandless
        2. LUCENE-3445.patch
          105 kB
          Michael McCandless
        3. LUCENE-3445.patch
          7 kB
          Simon Willnauer

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: