lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Munendra S N (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12127) Using atomic updates to remove docValues type dynamic field does not work
Date Thu, 06 Sep 2018 15:17:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605908#comment-16605908
] 

Munendra S N commented on SOLR-12127:
-------------------------------------

[~oliverkuldmae]
I did little debugging to check how Solr decides if it is atomic or inplace update. In inplace
updates, only set and inc operations are allowed. A check can be added here,  if the operation
is set and value is null or empty list, treat the update as atomic update, which would solve
the issue [^SOLR-12127.patch] 
I have attached the first draft (it doesn't include tests)

> Using atomic updates to remove docValues type dynamic field does not work
> -------------------------------------------------------------------------
>
>                 Key: SOLR-12127
>                 URL: https://issues.apache.org/jira/browse/SOLR-12127
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: update
>    Affects Versions: 6.6.2, 7.2
>            Reporter: Oliver Kuldmäe
>            Priority: Critical
>         Attachments: SOLR-12127.patch
>
>
> I have defined a dynamic field which is stored=false, indexed=false and docValues=true.
Attempting to set this field's value to null via atomic update does not remove the field from
the document. However, the document's version is updated. Using atomic updates to set a value
for the field does work. Tested on 6.6.2 and 7.2.1. 
> An example of a non-working update query:
> {code:java}
> <update>
>     <add>
>         <doc>
>             <field name="id">372335</field>
>             <field name="removed_field_262884_i_dv" update="set" null="true"/>
>         </doc>
>     </add>
> </update>
> {code}
>  
> An example of a working update query:
> {code:java}
> <update>
>     <add>
>         <doc>
>             <field name="id">372335</field>
>             <field name="removed_field_262884_i_dv" update="set">1521472499</field>
>         </doc>
>     </add>
> </update>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message