org.apache.solr.update.processor
Class FieldValueMutatingUpdateProcessor

java.lang.Object
  extended by org.apache.solr.update.processor.UpdateRequestProcessor
      extended by org.apache.solr.update.processor.FieldMutatingUpdateProcessor
          extended by org.apache.solr.update.processor.FieldValueMutatingUpdateProcessor

public abstract class FieldValueMutatingUpdateProcessor
extends FieldMutatingUpdateProcessor

Abstract subclass of FieldMutatingUpdateProcessor for implementing UpdateProcessors that will mutate all individual values of a selected field independently

See Also:
FieldMutatingUpdateProcessorFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
FieldMutatingUpdateProcessor.FieldNameSelector
 
Field Summary
static Object DELETE_VALUE_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
FieldValueMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next)
           
 
Method Summary
protected  SolrInputField mutate(SolrInputField src)
          Method for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processor
protected abstract  Object mutateValue(Object src)
          Mutates individual values of a field as needed, or returns the original value.
 
Methods inherited from class org.apache.solr.update.processor.FieldMutatingUpdateProcessor
createFieldNameSelector, processAdd, wrap
 
Methods inherited from class org.apache.solr.update.processor.UpdateRequestProcessor
finish, processCommit, processDelete, processMergeIndexes, processRollback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETE_VALUE_SINGLETON

public static final Object DELETE_VALUE_SINGLETON
Constructor Detail

FieldValueMutatingUpdateProcessor

public FieldValueMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector,
                                         UpdateRequestProcessor next)
Method Detail

mutateValue

protected abstract Object mutateValue(Object src)
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_SINGLETON to indicate that the value should be removed completely.
See Also:
DELETE_VALUE_SINGLETON

mutate

protected final SolrInputField mutate(SolrInputField src)
Description copied from class: FieldMutatingUpdateProcessor
Method for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processor

Specified by:
mutate in class FieldMutatingUpdateProcessor
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.


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.