Class MaxFieldValueUpdateProcessorFactory

  • All Implemented Interfaces:
    NamedListInitializedPlugin, SolrCoreAware

    public final class MaxFieldValueUpdateProcessorFactory
    extends FieldValueSubsetUpdateProcessorFactory
    An update processor that keeps only the maximum value from any selected fields where multiple values are found. Correct behavior requires tha all of the values in the SolrInputFields being mutated are mutually comparable; If this is not the case, then a SolrException will br thrown.

    By default, this processor matches no fields.

    In the example configuration below, if a document contains multiple integer values (ie: 64, 128, 1024) in the field largestFileSize then only the biggest value (ie: 1024) will be kept in that field.

      <processor class="solr.MaxFieldValueUpdateProcessorFactory">
        <str name="fieldName">largestFileSize</str>
      </processor>
     
    Since:
    4.0.0
    See Also:
    MinFieldValueUpdateProcessorFactory, Collections.max(java.util.Collection<? extends T>)