Package org.apache.solr.update.processor
Class UpdateRequestProcessor
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessor
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
DistributedUpdateProcessor,DocBasedVersionConstraintsProcessor,FieldMutatingUpdateProcessor,RegexpBoostProcessor,RoutedAliasUpdateProcessor,TolerantUpdateProcessor,URLClassifyProcessor
@SolrThreadUnsafe public abstract class UpdateRequestProcessor extends Object implements Closeable
This is a good place for subclassed update handlers to process the document before it is indexed. You may wish to add/remove fields or check if the requested user is allowed to update the given document...Perhaps you continue adding an error message (without indexing the document)... perhaps you throw an error and halt indexing (remove anything already indexed??)
By default, this just passes the request to the next processor in the chain.
- Since:
- solr 1.3
-
-
Field Summary
Fields Modifier and Type Field Description protected UpdateRequestProcessornext
-
Constructor Summary
Constructors Constructor Description UpdateRequestProcessor(UpdateRequestProcessor next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voiddoClose()Override to implement resource release logic that *must* be called at the end of a request.voidfinish()voidprocessAdd(AddUpdateCommand cmd)voidprocessCommit(CommitUpdateCommand cmd)voidprocessDelete(DeleteUpdateCommand cmd)voidprocessMergeIndexes(MergeIndexesCommand cmd)voidprocessRollback(RollbackUpdateCommand cmd)
-
-
-
Field Detail
-
next
protected final UpdateRequestProcessor next
-
-
Constructor Detail
-
UpdateRequestProcessor
public UpdateRequestProcessor(UpdateRequestProcessor next)
-
-
Method Detail
-
processAdd
public void processAdd(AddUpdateCommand cmd) throws IOException
- Throws:
IOException
-
processDelete
public void processDelete(DeleteUpdateCommand cmd) throws IOException
- Throws:
IOException
-
processMergeIndexes
public void processMergeIndexes(MergeIndexesCommand cmd) throws IOException
- Throws:
IOException
-
processCommit
public void processCommit(CommitUpdateCommand cmd) throws IOException
- Throws:
IOException
-
processRollback
public void processRollback(RollbackUpdateCommand cmd) throws IOException
- Throws:
IOException- Since:
- Solr 1.4
-
finish
public void finish() throws IOException- Throws:
IOException
-
close
public final void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
doClose
protected void doClose()
Override to implement resource release logic that *must* be called at the end of a request.
-
-