Solr
  1. Solr
  2. SOLR-3226

SignatureUpdateProcessor ignores non-string field values from the signature generation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: update
    • Labels:
      None

      Description

      When using for example XMLUpdateRequestProcessor, the signature is calculated correctly since all field values are strings. But when one uses DataImportHandler or BinaryUpdateRequestHandler, the signature generation will ignore any field values that are ints, longs, dates etc.

      This might result in overwriting non-similar documents, as it happened in my case while importing some db data through DIH.

      1. SOLR-3226.patch
        7 kB
        Hoss Man
      2. SOLR-3226.patch
        5 kB
        Spyros Kapnissis

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          24d 11h 40m 1 Hoss Man 02/Apr/12 23:45
          Resolved Resolved Closed Closed
          402d 10h 54m 1 Uwe Schindler 10/May/13 10:39
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hoss Man made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 4.0 [ 12314992 ]
          Resolution Fixed [ 1 ]
          Hide
          Hoss Man added a comment -

          Committed revision 1308625. - 3x

          Show
          Hoss Man added a comment - Committed revision 1308625. - 3x
          Hide
          Hoss Man added a comment -

          Committed revision 1308604. - trunk

          ...had to make a tweak to schema-luceneMatchVersion.xml to get all tests working however (TestMatchVersions uses same solrconfig.xml but diff schema.xml, so it freaked about "id" not existing)

          still testing the backport to 3x ... there were some other subtle tweaks needed there to the test because of branch drift

          Show
          Hoss Man added a comment - Committed revision 1308604. - trunk ...had to make a tweak to schema-luceneMatchVersion.xml to get all tests working however (TestMatchVersions uses same solrconfig.xml but diff schema.xml, so it freaked about "id" not existing) still testing the backport to 3x ... there were some other subtle tweaks needed there to the test because of branch drift
          Hoss Man made changes -
          Link This issue is related to SOLR-3200 [ SOLR-3200 ]
          Hoss Man made changes -
          Assignee Hoss Man [ hossman ]
          Fix Version/s 3.6 [ 12319065 ]
          Affects Version/s 3.4 [ 12316683 ]
          Affects Version/s 3.3 [ 12316471 ]
          Affects Version/s 3.2 [ 12316172 ]
          Affects Version/s 3.1 [ 12314371 ]
          Affects Version/s 1.4 [ 12313351 ]
          Hide
          Hoss Man added a comment -

          I wanna commit this into 3.6 ... but i'd like to get mark miller to sanity check th patch first (the instanceof String seems so deliberate i'm not sure if i'm missing something - i've pinged him on IRC to see if he can review ASAP)

          Suggested special text for the upgrading section in CHANGES.txt...

          A bug found and fixed in the SignatureUpdateProcessor that previously caused some 
          documents to produce the same signature even when the configured fields contained 
          distinct (non-String) values.  Users of SignatureUpdateProcessor are strongly advised 
          that they should re-index as document signatures may have now changed. 
          (see SOLR-3226 for details)
          
          Show
          Hoss Man added a comment - I wanna commit this into 3.6 ... but i'd like to get mark miller to sanity check th patch first (the instanceof String seems so deliberate i'm not sure if i'm missing something - i've pinged him on IRC to see if he can review ASAP) Suggested special text for the upgrading section in CHANGES.txt... A bug found and fixed in the SignatureUpdateProcessor that previously caused some documents to produce the same signature even when the configured fields contained distinct (non-String) values. Users of SignatureUpdateProcessor are strongly advised that they should re-index as document signatures may have now changed. (see SOLR-3226 for details)
          Hoss Man made changes -
          Attachment SOLR-3226.patch [ 12521022 ]
          Hide
          Hoss Man added a comment -

          Hmmm .... just noticed this jira ... this definitely seems like a really bad bug.

          Spyros: thank you so much for your patch (including tests!) ... i've updated it to also fix the case of Collections that contain non string.

          Show
          Hoss Man added a comment - Hmmm .... just noticed this jira ... this definitely seems like a really bad bug. Spyros: thank you so much for your patch (including tests!) ... i've updated it to also fix the case of Collections that contain non string.
          Spyros Kapnissis made changes -
          Field Original Value New Value
          Attachment SOLR-3226.patch [ 12517708 ]
          Hide
          Spyros Kapnissis added a comment -

          I'm adding a small patch that adds a simple String.valueOf for any field that fails the instanceof String typecheck.

          Show
          Spyros Kapnissis added a comment - I'm adding a small patch that adds a simple String.valueOf for any field that fails the instanceof String typecheck.
          Spyros Kapnissis created issue -

            People

            • Assignee:
              Hoss Man
              Reporter:
              Spyros Kapnissis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development