Class ParseFloatFieldUpdateProcessorFactory
- All Implemented Interfaces:
NamedListInitializedPlugin,SolrCoreAware
RoundingMode.CEILING. 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 a float field type.
If all values are parseable as float (or are already Float), then the field will be mutated, replacing each value with its parsed Float equivalent; otherwise, no mutation will occur.
The locale to use when parsing field values, which will affect the recognized grouping
separator and decimal characters, 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 12345.899f (the grouping separator character
is U+00AO NO-BREAK SPACE).
<processor class="solr.ParseFloatFieldUpdateProcessorFactory"> <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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory
FieldMutatingUpdateProcessorFactory.SelectorParamsNested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory
UpdateRequestProcessorFactory.RunAlways -
Field Summary
Fields inherited from class org.apache.solr.update.processor.ParseNumericFieldUpdateProcessorFactory
locale -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) protected booleanReturns true if the given FieldType is compatible with this parsing factory.Methods inherited from class org.apache.solr.update.processor.ParseNumericFieldUpdateProcessorFactory
getDefaultSelector, initMethods inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory
getSelector, inform, parseSelectorExclusionParams, parseSelectorParams
-
Constructor Details
-
ParseFloatFieldUpdateProcessorFactory
public ParseFloatFieldUpdateProcessorFactory()
-
-
Method Details
-
getInstance
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) - Specified by:
getInstancein classUpdateRequestProcessorFactory
-
isSchemaFieldTypeCompatible
Description copied from class:ParseNumericFieldUpdateProcessorFactoryReturns true if the given FieldType is compatible with this parsing factory.- Specified by:
isSchemaFieldTypeCompatiblein classParseNumericFieldUpdateProcessorFactory
-