public final class FirstFieldValueUpdateProcessorFactory extends FieldValueSubsetUpdateProcessorFactory
By default, this processor matches no fields.
For example, in the configuration below, if a field named
primary_author
contained multiple values (ie:
"Adam Doe", "Bob Smith", "Carla Jones"
) then only the first
value (ie: "Adam Doe"
) will be kept
<processor class="solr.FirstFieldValueUpdateProcessorFactory"> <str name="fieldName">primary_author</str> </processor>
LastFieldValueUpdateProcessorFactory
FieldMutatingUpdateProcessorFactory.SelectorParams
UpdateRequestProcessorFactory.RunAlways
Constructor and Description |
---|
FirstFieldValueUpdateProcessorFactory() |
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<Object> |
pickSubset(Collection<Object> values)
Method subclasses must override to specify which values should be kept.
|
getInstance
getSelector, inform, init, parseSelectorExclusionParams, parseSelectorParams
public FirstFieldValueUpdateProcessorFactory()
public Collection<Object> pickSubset(Collection<Object> values)
FieldValueSubsetUpdateProcessorFactory
pickSubset
in class FieldValueSubsetUpdateProcessorFactory
public FieldMutatingUpdateProcessor.FieldNameSelector getDefaultSelector(SolrCore core)
FieldMutatingUpdateProcessorFactory
getDefaultSelector
in class FieldMutatingUpdateProcessorFactory
FieldMutatingUpdateProcessor.SELECT_ALL_FIELDS
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.