Class ParseIntFieldUpdateProcessorFactory

  • All Implemented Interfaces:
    NamedListInitializedPlugin, SolrCoreAware

    public class ParseIntFieldUpdateProcessorFactory
    extends ParseNumericFieldUpdateProcessorFactory
    Attempts to mutate selected fields that have only CharSequence-typed values into Integer values. Grouping separators (',' in the ROOT locale) are parsed.

    The default selection behavior is to mutate both those fields that don't match a schema field, as well as those fields that match a schema field with an int field type.

    If all values are parseable as int (or are already Integer), then the field will be mutated, replacing each value with its parsed Integer equivalent; otherwise, no mutation will occur.

    The locale to use when parsing field values, which will affect the recognized grouping separator character, may optionally be specified. If no locale is configured, then Locale.ROOT will be used. The following configuration specifies the Russian/Russia locale, which will parse the string "12 345 899" as 12345899L (the grouping separator character is U+00AO NO-BREAK SPACE).

     <processor class="solr.ParseIntFieldUpdateProcessorFactory">
       <str name="locale">ru_RU</str>
     </processor>

    See Locale for a description of acceptable language, country (optional) and variant (optional) values, joined with underscore(s).

    Since:
    4.4.0