org.apache.solr.update.processor

Class RemoveBlankFieldUpdateProcessorFactory

  • All Implemented Interfaces:
    NamedListInitializedPlugin, SolrCoreAware


    public final class RemoveBlankFieldUpdateProcessorFactory
    extends FieldMutatingUpdateProcessorFactory
    Removes any values found which are CharSequence with a length of 0. (ie: empty strings)

    By default this processor applies itself to all fields.

    For example, with the configuration listed below, blank strings will be removed from all fields except those whose name ends with "_literal".

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