Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7504

Atomic Update causes solr.CountFieldValuesUpdateProcessorFactory to be wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.10.4, 5.0, 5.1
    • 4.10.4, 5.1
    • None

    Description

      Below is a snippet of my solrconfig.xml

      <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>
      

      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?

      curl -s 'http://localhost:9080/solr/ndr/update' -H 'Content-type:application/json' -d '[{"content_key":"ICS_100.RPT","researchpagekeycontentcategorynames":{"set":null}}]'
      

      Thanks for looking into this.

      Attachments

        Activity

          People

            Unassigned Unassigned
            iamjstates Jay
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: