lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: in-place atomic updates for numeric docValue field
Date Thu, 04 May 2017 14:30:27 GMT
On 5/4/2017 7:40 AM, Dan . wrote:
> I have a field like this:
> <fieldType name="integer" class="solr.TrieIntField" omitNorms="true"/>
> <field name="popularity" type="integer" indexed="false" stored="false"
> docValues="true" multiValued="false"/>
> so I can do a fast in-place atomic updates
> However if I do e.g.
> curl -H 'Content-Type: application/json'
> 'http://localhost:8983/solr/collection/update?commit=true'
> --data-binary '
> [{
>  "id":"my_id",
>  "popularity":{"set":null}
> }]'
> then I'd expect the popularity field to be removed, however it's not.

I'm not really sure how that "null" value will be interpreted.  It's
entirely possible that this won't actually delete the field.

I think we need a "delete" action for Atomic Updates, to entirely remove
the field regardless of what it currently contains.  There is "remove"
and "removeRegex", which MIGHT be enough, but I think delete would be
useful syntactic sugar.

Dan, can you give the following update JSON a try instead?  I am not
guaranteeing that this will do the job, but given the current
functionality, I think this is the option most likely to work:



View raw message