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

IndexReader.setTermInfosIndexDivisor doesn't carry over to reopened readers

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When you reopen a reader, some segments are shared (and thus properly inherit the index divisor) but others are newly opened and use the default index divisor. You then have no way to change the index divisor of those newly opened ones. The only workaround is to not use reopen (always open a new reader).

      I'd like to make termInfosDivisor an up-front param to IndexReader, anyway, for LUCENE-1609, so likely I'll fix both of these issues there.

        Activity

        Hide
        tsmith Tim Smith added a comment -

        perfect

        i had checked your last patch on LUCENE-1609 and hadn't seen any explicit handling of this situation yet, so just wanted to call it out

        Show
        tsmith Tim Smith added a comment - perfect i had checked your last patch on LUCENE-1609 and hadn't seen any explicit handling of this situation yet, so just wanted to call it out
        Hide
        mikemccand Michael McCandless added a comment -

        Thanks Tim. This should be fixed with LUCENE-1609: DirectoryReader now holds onto the termInfosIndexDivisor and passes it when opening new SegmentReaders during reopen.

        Show
        mikemccand Michael McCandless added a comment - Thanks Tim. This should be fixed with LUCENE-1609 : DirectoryReader now holds onto the termInfosIndexDivisor and passes it when opening new SegmentReaders during reopen.
        Hide
        mikemccand Michael McCandless added a comment -

        Fixed with LUCENE-1609.

        Show
        mikemccand Michael McCandless added a comment - Fixed with LUCENE-1609 .

          People

          • Assignee:
            mikemccand Michael McCandless
            Reporter:
            mikemccand Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development