org.apache.solr.update.processor

## Class MinFieldValueUpdateProcessorFactory

- java.lang.Object
- - org.apache.solr.update.processor.UpdateRequestProcessorFactory
  - - org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory
    - - org.apache.solr.update.processor.FieldValueSubsetUpdateProcessorFactory
      - - org.apache.solr.update.processor.MinFieldValueUpdateProcessorFactory

- All Implemented Interfaces:
    NamedListInitializedPlugin, SolrCoreAware

      public final class MinFieldValueUpdateProcessorFactory
      extends FieldValueSubsetUpdateProcessorFactory

  An update processor that keeps only the the minimum 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 `smallestFileSize` then only the smallest value (ie: `64`) will be kept in that field.

        <processor class="solr.MinFieldValueUpdateProcessorFactory">
          <str name="fieldName">smallestFileSize</str>
        </processor>

  See Also:
    `MaxFieldValueUpdateProcessorFactory`, `Collections.min(java.util.Collection<? extends T>)`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory

      `FieldMutatingUpdateProcessorFactory.SelectorParams`

    - ### Nested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory

      `UpdateRequestProcessorFactory.RunAlways`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinFieldValueUpdateProcessorFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FieldMutatingUpdateProcessor.FieldNameSelector` | `getDefaultSelector(SolrCore core)` Defines the default selection behavior when the user has not configured any specific criteria for selecting fields.
    `Collection` | `pickSubset(Collection values)` Method subclasses must override to specify which values should be kept.

    - ### Methods inherited from class org.apache.solr.update.processor.FieldValueSubsetUpdateProcessorFactory

      `getInstance`

    - ### Methods inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory

      `getSelector, inform, init, parseSelectorExclusionParams, parseSelectorParams`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MinFieldValueUpdateProcessorFactory

          public MinFieldValueUpdateProcessorFactory()

  - ### Method Detail

    - #### pickSubset

          public Collection pickSubset(Collection values)

      Description copied from class: `FieldValueSubsetUpdateProcessorFactory`
      Method subclasses must override to specify which values should be kept. This method will not be called unless the collection contains more then one value.
      Specified by:
        `pickSubset` in class `FieldValueSubsetUpdateProcessorFactory`

    - #### getDefaultSelector

          public FieldMutatingUpdateProcessor.FieldNameSelector getDefaultSelector(SolrCore core)

      Description copied from class: `FieldMutatingUpdateProcessorFactory`
      Defines the default selection behavior when the user has not configured any specific criteria for selecting fields. The Default implementation matches all fields, and should be overridden by subclasses as needed.
      Overrides:
        `getDefaultSelector` in class `FieldMutatingUpdateProcessorFactory`
      See Also:
        `FieldMutatingUpdateProcessor.SELECT_ALL_FIELDS`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.