Atomic update deletes deduplication signature

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Atomic update deletes deduplication signature

Thomas Eckart
Hello,

I am having trouble when doing atomic updates in combination with
SignatureUpdateProcessorFactory (on Solr 7.2). Normal commits of new
documents work as expected and generate a valid signature:

curl "$URL/update?commit=true" -H 'Content-type:application/json' -d
'{"add":{"doc":{"id": "TEST_ID1", "description": "description",
"country": "country"}}}' && curl "$URL/select?q=id:TEST_ID1"

"response":{"numFound":1,"start":0,"docs":[
{
    "id":"TEST_ID1",
    "description":["description"],
    "country":["country"],
    "_signature":"e577e465b9099ba8",  <-- valid signature
    "_version_":1608322850016460800}]
}}

However, when updating a field (that is not used for generating the
signature) the signature is replaced by "0000000000000000":

curl "$URL/update?commit=true" -H 'Content-type:application/json' -d
'{"add":{"doc":{"id": "TEST_ID1", "country": {"set": "country2"}}}}' &&
curl "$URL/select?q=id:TEST_ID1"

"response":{"numFound":1,"start":0,"docs":[
{
    "id":"TEST_ID1",
    "description":["description"],
    "country":["country2"],
    "_signature":"0000000000000000",  <-- broken signature
    "_version_":1608322857485467648}]
}}

This looks a lot like the second problem mentioned in an old Solr JIRA
issue ([1]). Unfortunately, there is no relevant response in the
discussion there.
Any ideas how to fix this?

Thank you,
Thomas


solrconfig.xml:
<updateRequestProcessorChain name="files-update-processor">
[...]
    <processor class="solr.processor.SignatureUpdateProcessorFactory">
       <bool name="enabled">true</bool>
       <str name="signatureField">_signature</str>
       <bool name="overwriteDupes">false</bool>
       <str name="fields">description</str>
       <str name="signatureClass">solr.processor.Lookup3Signature</str>
    </processor>
    <processor class="solr.LogUpdateProcessorFactory"/>
    <processor class="solr.RunUpdateProcessorFactory"/>
</updateRequestProcessorChain>


[1] https://issues.apache.org/jira/browse/SOLR-4016