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

Paul Heijman commented on SOLR-7504:
------------------------------------

This is still an issue in 9.6.1.

It has nothing to do with setting fields to null:
{code:json}
{
    "content_key": "ICS_100.RPT",
    "researchpagekeycontentcategorynames": {
        "add": {
            "test"
        }
     }
}
{code}
will also set key_content_count to one...

> Atomic Update causes solr.CountFieldValuesUpdateProcessorFactory to be wrong
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-7504
>                 URL: https://issues.apache.org/jira/browse/SOLR-7504
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 4.10.4, 5.0, 5.1
>            Reporter: Jay
>            Priority: Major
>             Fix For: 4.10.4, 5.1
>
>
> Below is a snippet of my solrconfig.xml
> {code}
> <updateRequestProcessorChain name="custom-updates" default="true">
>         <processor class="solr.RemoveBlankFieldUpdateProcessorFactory">
>            <lst name="exclude">
>              <str name="fieldRegex">.*_count</str>
>            </lst>
>          </processor>
>         <processor class="solr.UUIDUpdateProcessorFactory">
>             <str name="fieldName">id</str>
>         </processor>
>         <!-- Allows you make counts for multivalued field-->
>         <processor class="solr.CloneFieldUpdateProcessorFactory">
>             <str name="source">researchpagekeycontentcategorynames</str>
>             <str name="dest">key_content_count</str>
>         </processor>
>         <processor class="solr.CountFieldValuesUpdateProcessorFactory">
>             <str name="fieldName">key_content_count</str>
>         </processor>
>         <processor class="solr.DefaultValueUpdateProcessorFactory">
>           <str name="fieldName">key_content_count</str>
>           <int name="value">0</int>
>         </processor>
> {code}
> Performing an Atomic Update like this causes that key_content_count to be one 
> (1) when the expected value should be zero (0).
> To my knowledge setting a value to null should zero out the count, correct?
> {code}
> curl -s 'http://localhost:9080/solr/ndr/update' -H 
> 'Content-type:application/json' -d 
> '[{"content_key":"ICS_100.RPT","researchpagekeycontentcategorynames":{"set":null}}]'
> {code}
> Thanks for looking into this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to