Class ConcatFieldUpdateProcessorFactory

  • All Implemented Interfaces:
    NamedListInitializedPlugin, SolrCoreAware

    public final class ConcatFieldUpdateProcessorFactory
    extends FieldMutatingUpdateProcessorFactory
    Concatenates multiple values for fields matching the specified conditions using a configurable delimiter which defaults to ", ".

    By default, this processor concatenates the values for any field name which according to the schema is multiValued="false" and uses TextField or StrField

    For example, in the configuration below, any "single valued" string and text field which is found to contain multiple values except for the primary_author field will be concatenated using the string "; " as a delimiter. For the primary_author field, the multiple values will be left alone for FirstFieldValueUpdateProcessorFactory to deal with.

     <processor class="solr.ConcatFieldUpdateProcessorFactory">
       <str name="delimiter">; </str>
       <lst name="exclude">
         <str name="fieldName">primary_author</str>
       </lst>
     </processor>
     <processor class="solr.FirstFieldValueUpdateProcessorFactory">
       <str name="fieldName">primary_author</str>
     </processor>
    Since:
    4.0.0