Package org.apache.solr.update.processor
Class AllValuesOrNoneFieldMutatingUpdateProcessor
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessor
-
- org.apache.solr.update.processor.FieldMutatingUpdateProcessor
-
- org.apache.solr.update.processor.AllValuesOrNoneFieldMutatingUpdateProcessor
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public abstract class AllValuesOrNoneFieldMutatingUpdateProcessor extends FieldMutatingUpdateProcessor
Abstract subclass of FieldMutatingUpdateProcessor for implementing UpdateProcessors that will mutate all individual values of a selected field independently. If not all individual values are acceptable - i.e., mutateValue(srcVal) returnsSKIP_FIELD_VALUE_LIST_SINGLETONfor at least one value - then none of the values are mutated: mutate(srcField) will return srcField.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
FieldMutatingUpdateProcessor.FieldNameSelector
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectDELETE_VALUE_SINGLETONstatic ObjectSKIP_FIELD_VALUE_LIST_SINGLETON-
Fields inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
SELECT_ALL_FIELDS, SELECT_NO_FIELDS
-
Fields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
next
-
-
Constructor Summary
Constructors Constructor Description AllValuesOrNoneFieldMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.apache.solr.common.SolrInputFieldmutate(org.apache.solr.common.SolrInputField srcField)Method for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processorprotected abstract ObjectmutateValue(Object srcVal)Mutates individual values of a field as needed, or returns the original value.-
Methods inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
createFieldNameSelector, createFieldNameSelector, mutator, processAdd, wrap
-
Methods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
close, doClose, finish, processCommit, processDelete, processMergeIndexes, processRollback
-
-
-
-
Constructor Detail
-
AllValuesOrNoneFieldMutatingUpdateProcessor
public AllValuesOrNoneFieldMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next)
-
-
Method Detail
-
mutateValue
protected abstract Object mutateValue(Object srcVal)
Mutates individual values of a field as needed, or returns the original value.- Parameters:
srcVal- a value from a matched field which should be mutated- Returns:
- the value to use as a replacement for src, or
DELETE_VALUE_SINGLETONto indicate that the value should be removed completely, orSKIP_FIELD_VALUE_LIST_SINGLETONto indicate that a field value is not consistent with - See Also:
DELETE_VALUE_SINGLETON,SKIP_FIELD_VALUE_LIST_SINGLETON
-
mutate
protected final org.apache.solr.common.SolrInputField mutate(org.apache.solr.common.SolrInputField srcField)
Description copied from class:FieldMutatingUpdateProcessorMethod for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processor- Specified by:
mutatein classFieldMutatingUpdateProcessor- Parameters:
srcField- the SolrInputField to mutate, may be modified in place and returned- Returns:
- the SolrInputField to use in replacing the original (src) value. If null the field will be removed.
-
-