Package org.apache.solr.update.processor
Class FieldValueMutatingUpdateProcessor
java.lang.Object
org.apache.solr.update.processor.UpdateRequestProcessor
org.apache.solr.update.processor.FieldMutatingUpdateProcessor
org.apache.solr.update.processor.FieldValueMutatingUpdateProcessor
- All Implemented Interfaces:
Closeable,AutoCloseable
Abstract subclass of FieldMutatingUpdateProcessor for implementing UpdateProcessors that will
mutate all individual values of a selected field independently
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
FieldMutatingUpdateProcessor.FieldNameSelector -
Field Summary
FieldsFields inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
SELECT_ALL_FIELDS, SELECT_NO_FIELDSFields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
next -
Constructor Summary
ConstructorsConstructorDescriptionFieldValueMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next) -
Method Summary
Modifier and TypeMethodDescriptionprotected final org.apache.solr.common.SolrInputFieldmutate(org.apache.solr.common.SolrInputField src) Method for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processorprotected abstract ObjectmutateValue(Object src) Mutates individual values of a field as needed, or returns the original value.valueMutator(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next, Function<Object, Object> fun) Methods inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
createFieldNameSelector, createFieldNameSelector, mutator, processAdd, wrapMethods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
close, doClose, finish, processCommit, processDelete, processMergeIndexes, processRollback
-
Field Details
-
DELETE_VALUE_SINGLETON
-
-
Constructor Details
-
FieldValueMutatingUpdateProcessor
public FieldValueMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next)
-
-
Method Details
-
mutateValue
Mutates individual values of a field as needed, or returns the original value.- Parameters:
src- 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. - See Also:
-
mutate
protected final org.apache.solr.common.SolrInputField mutate(org.apache.solr.common.SolrInputField src) Description copied from class:FieldMutatingUpdateProcessorMethod for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processor- Specified by:
mutatein classFieldMutatingUpdateProcessor- Parameters:
src- 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.
-
valueMutator
public static FieldValueMutatingUpdateProcessor valueMutator(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next, Function<Object, Object> fun)
-