public abstract class UpdateHandler extends java.lang.Object implements SolrInfoMBean
UpdateHandler
handles requests to change the index
(adds, deletes, commits, optimizes, etc).Modifier and Type | Class and Description |
---|---|
(package private) static class |
UpdateHandler.DeleteHitCollector |
SolrInfoMBean.Category
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<SolrEventListener> |
commitCallbacks |
protected SolrCore |
core |
protected SchemaField |
idField |
protected FieldType |
idFieldType |
protected org.apache.lucene.index.Term |
idTerm |
protected static org.slf4j.Logger |
log |
protected java.util.Vector<SolrEventListener> |
optimizeCallbacks |
protected IndexSchema |
schema |
Constructor and Description |
---|
UpdateHandler(SolrCore core) |
Modifier and Type | Method and Description |
---|---|
abstract int |
addDoc(AddUpdateCommand cmd) |
protected void |
callPostCommitCallbacks() |
protected void |
callPostOptimizeCallbacks() |
abstract void |
close() |
abstract void |
commit(CommitUpdateCommand cmd) |
protected SolrIndexWriter |
createMainIndexWriter(java.lang.String name,
boolean removeAllExisting) |
abstract void |
delete(DeleteUpdateCommand cmd) |
abstract void |
deleteByQuery(DeleteUpdateCommand cmd) |
protected java.lang.String |
getIndexedId(org.apache.lucene.document.Document doc) |
protected java.lang.String |
getIndexedIdOptional(org.apache.lucene.document.Document doc) |
protected org.apache.lucene.index.Term |
idTerm(java.lang.String readableId) |
abstract int |
mergeIndexes(MergeIndexesCommand cmd) |
private void |
parseEventListeners() |
void |
registerCommitCallback(SolrEventListener listener)
NOTE: this function is not thread safe.
|
void |
registerOptimizeCallback(SolrEventListener listener)
NOTE: this function is not thread safe.
|
abstract void |
rollback(RollbackUpdateCommand cmd) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCategory, getDescription, getDocs, getName, getSource, getSourceId, getStatistics, getVersion
protected static final org.slf4j.Logger log
protected final SolrCore core
protected final IndexSchema schema
protected final SchemaField idField
protected final FieldType idFieldType
protected final org.apache.lucene.index.Term idTerm
protected java.util.Vector<SolrEventListener> commitCallbacks
protected java.util.Vector<SolrEventListener> optimizeCallbacks
public UpdateHandler(SolrCore core)
private void parseEventListeners()
protected void callPostCommitCallbacks()
protected void callPostOptimizeCallbacks()
protected SolrIndexWriter createMainIndexWriter(java.lang.String name, boolean removeAllExisting) throws java.io.IOException
java.io.IOException
protected final org.apache.lucene.index.Term idTerm(java.lang.String readableId)
protected final java.lang.String getIndexedId(org.apache.lucene.document.Document doc)
protected final java.lang.String getIndexedIdOptional(org.apache.lucene.document.Document doc)
public abstract int addDoc(AddUpdateCommand cmd) throws java.io.IOException
java.io.IOException
public abstract void delete(DeleteUpdateCommand cmd) throws java.io.IOException
java.io.IOException
public abstract void deleteByQuery(DeleteUpdateCommand cmd) throws java.io.IOException
java.io.IOException
public abstract int mergeIndexes(MergeIndexesCommand cmd) throws java.io.IOException
java.io.IOException
public abstract void commit(CommitUpdateCommand cmd) throws java.io.IOException
java.io.IOException
public abstract void rollback(RollbackUpdateCommand cmd) throws java.io.IOException
java.io.IOException
public abstract void close() throws java.io.IOException
java.io.IOException
public void registerCommitCallback(SolrEventListener listener)
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationExceptionSolrCoreAware
public void registerOptimizeCallback(SolrEventListener listener)
inform( SolrCore core )
function for SolrCoreAware
classes.
Outside inform
, this could potentially throw a ConcurrentModificationExceptionSolrCoreAware