org.apache.solr.update.processor

Class TrimFieldUpdateProcessorFactory

  • All Implemented Interfaces:
    NamedListInitializedPlugin, SolrCoreAware


    public final class TrimFieldUpdateProcessorFactory
    extends FieldMutatingUpdateProcessorFactory
    Trims leading and trailing whitespace from any CharSequence values found in fields matching the specified conditions and returns the resulting String.

    By default this processor matches all fields

    For example, with the configuration listed all String field values will have leading and trailing spaces removed except for fields whose named ends with "_literal".

     <processor class="solr.TrimFieldUpdateProcessorFactory">
       <lst name="exclude">
         <str name="fieldRegex">.*_literal</str>
       </lst>
     </processor>