Lucene - Core
  1. Lucene - Core
  2. LUCENE-6315

Simplify custom Term iterator used to resolve deletions

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      In LUCENE-6161 we added yet-another-term-iterator ... this patch tries to simplify that by re-using the existing BytesRefIterator instead.

      1. LUCENE-6315.patch
        12 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Patch, cutting over the package-private FieldTermIterator to a BytesRefIterator.

        Show
        Michael McCandless added a comment - Patch, cutting over the package-private FieldTermIterator to a BytesRefIterator.
        Hide
        Adrien Grand added a comment -

        I like merging these iterators but the API still feels a bit weird to me (the field() part in particular). I wish we could reuse Fields/Terms but it doesn't look possible given that fields are not known in advance. So I think we should commit this patch. The FieldTermIterator.field() documentation says that it will return

        {@code null}

        if iteration is finished, should we rather say that the behaviour of this method is unspecified after iteration is finished?

        Show
        Adrien Grand added a comment - I like merging these iterators but the API still feels a bit weird to me (the field() part in particular). I wish we could reuse Fields/Terms but it doesn't look possible given that fields are not known in advance. So I think we should commit this patch. The FieldTermIterator.field() documentation says that it will return {@code null} if iteration is finished, should we rather say that the behaviour of this method is unspecified after iteration is finished?
        Hide
        Robert Muir added a comment -

        Hi Mike, I missed this refactoring. This is an improvement +1

        Show
        Robert Muir added a comment - Hi Mike, I missed this refactoring. This is an improvement +1
        Hide
        Michael McCandless added a comment -

        Thanks guys.

        The FieldTermIterator.field() documentation says that it will return {@code null} if iteration is finished, should we rather say that the behaviour of this method is unspecified after iteration is finished?

        +1, that's a leftover ... I'll fix it.

        Show
        Michael McCandless added a comment - Thanks guys. The FieldTermIterator.field() documentation says that it will return {@code null} if iteration is finished, should we rather say that the behaviour of this method is unspecified after iteration is finished? +1, that's a leftover ... I'll fix it.
        Hide
        ASF subversion and git services added a comment -

        Commit 1672710 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1672710 ]

        LUCENE-6315: simplify the private iterator Lucene uses when resolving deleted terms -> docids

        Show
        ASF subversion and git services added a comment - Commit 1672710 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1672710 ] LUCENE-6315 : simplify the private iterator Lucene uses when resolving deleted terms -> docids
        Hide
        ASF subversion and git services added a comment -

        Commit 1672713 from Michael McCandless in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1672713 ]

        LUCENE-6315: simplify the private iterator Lucene uses when resolving deleted terms -> docids

        Show
        ASF subversion and git services added a comment - Commit 1672713 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1672713 ] LUCENE-6315 : simplify the private iterator Lucene uses when resolving deleted terms -> docids
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development