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

Add SearcherLifetimeManager, so you can retrieve the same searcher you previously used

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.5, 4.0-ALPHA
    • core/search
    • None
    • New

    Description

      The idea is similar to SOLR-2809 (adding searcher leases to Solr).

      This utility class sits above whatever your source is for "the
      current" searcher (eg NRTManager, SearcherManager, etc.), and records
      (holds a reference to) each searcher in recent history.

      The idea is to ensure that when a user does a follow-on action (clicks
      next page, drills down/up), or when two or more searcher invocations
      within a single user search need to happen against the same searcher
      (eg in distributed search), you can retrieve the same searcher you
      used "last time".

      I think with the new searchAfter API (LUCENE-2215), doing follow-on
      searches on the same searcher is more important, since the "bottom"
      (score/docID) held for that API can easily shift when a new searcher
      is opened.

      When you do a "new" search, you record the searcher you used with the
      manager, and it returns to you a long token (currently just the
      IR.getVersion()), which you can later use to retrieve the same
      searcher.

      Separately you must periodically call prune(), to prune the old
      searchers, ideally from the same thread / at the same time that
      you open a new searcher.

      Attachments

        1. LUCENE-3486.patch
          15 kB
          Michael McCandless
        2. LUCENE-3486.patch
          16 kB
          Michael McCandless
        3. LUCENE-3486.patch
          14 kB
          Michael McCandless

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: