Lucene - Core
  1. Lucene - Core
  2. LUCENE-5706

Don't allow unsetting values through DocValues updates

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9, 6.0
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Spinoff from LUCENE-5680: we shouldn't allow unsetting values through DocValues updates, at least not until there's a real usecase for it. This will simplify a lot of the internal code, as well make the numeric update API work w/ primitive long instead of Long.

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        This would make supporting Solr's atomic update API impossible. Ishan has a working patch on SOLR-5944.

        Show
        Shalin Shekhar Mangar added a comment - This would make supporting Solr's atomic update API impossible. Ishan has a working patch on SOLR-5944 .
        Hide
        Shai Erera added a comment -

        Why is that impossible? Solr can still update the value of the field, just not unset it. What is the usecase for unsetting a DV field's value?

        Show
        Shai Erera added a comment - Why is that impossible? Solr can still update the value of the field, just not unset it. What is the usecase for unsetting a DV field's value?
        Hide
        Shai Erera added a comment -

        I checked the patch on SOLR-5944 and I only see this line related to updateNumericDocValue:

        writer.updateNumericDocValue(updateTerm, field.name(), field.numericValue().longValue());
        

        So it already assumes the update value isn't null right?

        Show
        Shai Erera added a comment - I checked the patch on SOLR-5944 and I only see this line related to updateNumericDocValue: writer.updateNumericDocValue(updateTerm, field.name(), field.numericValue().longValue()); So it already assumes the update value isn't null right?
        Hide
        Shai Erera added a comment -

        Patch removes this capability. It simplified a lot of the internal code, as well as changed the API to take a long. If we ever need to return that capability again, we can pull the diffs from SVN. I think it's ready.

        Show
        Shai Erera added a comment - Patch removes this capability. It simplified a lot of the internal code, as well as changed the API to take a long . If we ever need to return that capability again, we can pull the diffs from SVN. I think it's ready.
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1597600 from Shai Erera in branch 'dev/trunk'
        [ https://svn.apache.org/r1597600 ]

        LUCENE-5706: remove the ability to unset a DocValues field through DV updates

        Show
        ASF subversion and git services added a comment - Commit 1597600 from Shai Erera in branch 'dev/trunk' [ https://svn.apache.org/r1597600 ] LUCENE-5706 : remove the ability to unset a DocValues field through DV updates
        Hide
        ASF subversion and git services added a comment -

        Commit 1597604 from Shai Erera in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1597604 ]

        LUCENE-5706: remove the ability to unset a DocValues field through DV updates

        Show
        ASF subversion and git services added a comment - Commit 1597604 from Shai Erera in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1597604 ] LUCENE-5706 : remove the ability to unset a DocValues field through DV updates
        Hide
        Shai Erera added a comment -

        Committed to trunk and 4x.

        Show
        Shai Erera added a comment - Committed to trunk and 4x.

          People

          • Assignee:
            Shai Erera
            Reporter:
            Shai Erera
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development