|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.update.processor.UpdateRequestProcessor org.apache.solr.update.processor.FieldMutatingUpdateProcessor
public abstract class FieldMutatingUpdateProcessor
Reusable base class for UpdateProcessors that will consider AddUpdateCommands and mutate the values associated with configured fields.
Subclasses should override the mutate method to specify how individual SolrInputFields identified by the selector associated with this instance will be mutated.
FieldMutatingUpdateProcessorFactory
,
FieldValueMutatingUpdateProcessor
,
FieldMutatingUpdateProcessor.FieldNameSelector
Nested Class Summary | |
---|---|
static interface |
FieldMutatingUpdateProcessor.FieldNameSelector
Interface for identifying which fields should be mutated |
Field Summary | |
---|---|
static org.slf4j.Logger |
log
|
static FieldMutatingUpdateProcessor.FieldNameSelector |
SELECT_ALL_FIELDS
Singleton indicating all fields should be mutated |
static FieldMutatingUpdateProcessor.FieldNameSelector |
SELECT_NO_FIELDS
Singleton indicating no fields should be mutated |
Fields inherited from class org.apache.solr.update.processor.UpdateRequestProcessor |
---|
next |
Constructor Summary | |
---|---|
FieldMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector,
UpdateRequestProcessor next)
|
Method Summary | |
---|---|
static FieldMutatingUpdateProcessor.FieldNameSelector |
createFieldNameSelector(SolrResourceLoader loader,
SolrCore core,
FieldMutatingUpdateProcessorFactory.SelectorParams params,
FieldMutatingUpdateProcessor.FieldNameSelector defSelector)
Utility method that can be used to define a FieldNameSelector using the same types of rules as the FieldMutatingUpdateProcessor init code. |
protected abstract SolrInputField |
mutate(SolrInputField src)
Method for mutating SolrInputFields associated with fields identified by the FieldNameSelector associated with this processor |
void |
processAdd(AddUpdateCommand cmd)
Calls mutate on any fields identified by the selector
before forwarding the command down the chain. |
static FieldMutatingUpdateProcessor.FieldNameSelector |
wrap(FieldMutatingUpdateProcessor.FieldNameSelector includes,
FieldMutatingUpdateProcessor.FieldNameSelector excludes)
Wraps two FieldNameSelectors such that the FieldNameSelector returned matches all fields specified by the "includes" unless they are matched by "excludes" |
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 |
---|
public static final org.slf4j.Logger log
public static final FieldMutatingUpdateProcessor.FieldNameSelector SELECT_ALL_FIELDS
public static final FieldMutatingUpdateProcessor.FieldNameSelector SELECT_NO_FIELDS
Constructor Detail |
---|
public FieldMutatingUpdateProcessor(FieldMutatingUpdateProcessor.FieldNameSelector selector, UpdateRequestProcessor next)
Method Detail |
---|
protected abstract SolrInputField mutate(SolrInputField src)
src
- the SolrInputField to mutate, may be modified in place and
returned
public void processAdd(AddUpdateCommand cmd) throws IOException
mutate
on any fields identified by the selector
before forwarding the command down the chain. Any SolrExceptions
thrown by mutate
will be logged with the Field name,
wrapped and re-thrown.
processAdd
in class UpdateRequestProcessor
IOException
public static FieldMutatingUpdateProcessor.FieldNameSelector wrap(FieldMutatingUpdateProcessor.FieldNameSelector includes, FieldMutatingUpdateProcessor.FieldNameSelector excludes)
includes
- a selector identifying field names that should be selectedexcludes
- a selector identifying field names that should be
not be selected, even if they are matched by the 'includes'
selector
public static FieldMutatingUpdateProcessor.FieldNameSelector createFieldNameSelector(SolrResourceLoader loader, SolrCore core, FieldMutatingUpdateProcessorFactory.SelectorParams params, FieldMutatingUpdateProcessor.FieldNameSelector defSelector)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |