On 6/1/2022 3:27 AM, Yirmiyahu Fischer wrote:
I tried

     <updateRequestProcessorChain name="concatFields">
         <processor class="solr.CloneFieldUpdateProcessorFactory">
             <str name="source">BrandName_s</str>
             <str name="source">ManufacturerNo_s</str>
             <str name="dest">BrandMfgConcat_t</str>
         </processor>
         <processor class="solr.ConcatFieldUpdateProcessorFactory">
             <str name="fieldName">BrandMfgConcat_t</str>
         </processor>
         <processor class="solr.LogUpdateProcessorFactory" />
         <processor class="solr.RunUpdateProcessorFactory" />
     </updateRequestProcessorChain>

However, after indexing, the field BrandMfgConcat_t does not appear in the
record

I bet that you haven't done anything to actually tell Solr to use that update processor.

I put this in my config:

    <updateRequestProcessorChain name="concatFields" default="true">
        <processor class="solr.CloneFieldUpdateProcessorFactory">
            <str name="source">s1</str>
            <str name="source">s2</str>
            <str name="dest">s3</str>
        </processor>
        <processor class="solr.ConcatFieldUpdateProcessorFactory">
            <str name="fieldName">s3</str>
            <str name="delimiter"> </str>
        </processor>
        <processor class="solr.LogUpdateProcessorFactory" />
        <processor class="solr.RunUpdateProcessorFactory" />
    </updateRequestProcessorChain>

And then indexed a doc with s1 and s2 fields, and very deliberately excluding the s3 field.  This is what I get when querying for that doc:

|<result name="response" numFound="1" start="0" numFoundExact="true"> <doc> <str name="id">144</str> <long name="uid">144</long> <str name="box">144</str> <str name="user">144</str> <str name="s1">Test</str> <str name="s2">Doc</str> <str name="s3">Test Doc</str> <long name="_version_">1734426113514405888</long></doc> </result> The major difference between your config and mine is that I marked the update processor as default, which means that it will always be used unless another is specified. Thanks, Shawn |

Reply via email to