public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState.IndexWriterCloser, SolrMetricProducer
DirectUpdateHandler2 implements an UpdateHandler where documents are added
directly to the main Lucene index as opposed to adding to a separate smaller index.SolrInfoBean.Category, SolrInfoBean.Group| Modifier and Type | Field and Description |
|---|---|
static boolean |
commitOnClose |
protected CommitTracker |
commitTracker |
protected boolean |
commitWithinSoftCommit |
protected boolean |
indexWriterCloseWaitsForMerges |
protected CommitTracker |
softCommitTracker |
protected SolrCoreState |
solrCoreState |
commitCallbacks, core, idField, idFieldType, metricNames, optimizeCallbacks, registry, softCommitCallbacks, ulog| Constructor and Description |
|---|
DirectUpdateHandler2(SolrCore core) |
DirectUpdateHandler2(SolrCore core,
UpdateHandler updateHandler) |
callPostCommitCallbacks, callPostOptimizeCallbacks, callPostSoftCommitCallbacks, getCategory, getMetricNames, getMetricRegistry, informEventListeners, registerCommitCallback, registerOptimizeCallback, registerSoftCommitCallbackclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeMetricsgetMetricsSnapshot, registerMetricNameprotected final SolrCoreState solrCoreState
protected final CommitTracker commitTracker
protected final CommitTracker softCommitTracker
protected boolean commitWithinSoftCommit
protected boolean indexWriterCloseWaitsForMerges
public static volatile boolean commitOnClose
public DirectUpdateHandler2(SolrCore core)
public DirectUpdateHandler2(SolrCore core, UpdateHandler updateHandler)
public void initializeMetrics(SolrMetricManager manager, String registryName, String tag, String scope)
SolrMetricProducerNote: for back-compatibility this method by default calls SolrMetricProducer.initializeMetrics(SolrMetricManager, String, String).
initializeMetrics in interface SolrMetricProducermanager - an instance of SolrMetricManagerregistryName - registry name where metrics are registeredtag - symbolic tag that represents a group of related instances that
have the same life-cycle. Parent component can use the tag when
calling SolrMetricManager.unregisterGauges(String, String)
to unregister metrics created by this instance of the producer.scope - scope of the metrics (eg. handler name) to separate metrics of
instances of the same component executing in different contextsprotected void rollbackWriter()
throws IOException
IOExceptionpublic int addDoc(AddUpdateCommand cmd) throws IOException
addDoc in class UpdateHandlerIOExceptionpublic void delete(DeleteUpdateCommand cmd) throws IOException
delete in class UpdateHandlerIOExceptionpublic void clearIndex()
throws IOException
IOExceptionpublic void deleteByQuery(DeleteUpdateCommand cmd) throws IOException
deleteByQuery in class UpdateHandlerIOExceptionpublic int mergeIndexes(MergeIndexesCommand cmd) throws IOException
mergeIndexes in class UpdateHandlerIOExceptionpublic void prepareCommit(CommitUpdateCommand cmd) throws IOException
IOExceptionpublic void commit(CommitUpdateCommand cmd) throws IOException
commit in class UpdateHandlerIOExceptionpublic void newIndexWriter(boolean rollback)
throws IOException
UpdateHandlernewIndexWriter in class UpdateHandlerrollback - IndexWriter if true else closeIOException - If there is a low-level I/O error.public void rollback(RollbackUpdateCommand cmd) throws IOException
rollback in class UpdateHandlerIOExceptionpublic UpdateLog getUpdateLog()
getUpdateLog in class UpdateHandlerpublic void close()
throws IOException
close in class UpdateHandlerIOExceptionpublic void closeWriter(IndexWriter writer) throws IOException
closeWriter in interface SolrCoreState.IndexWriterCloserIOExceptionpublic void split(SplitIndexCommand cmd) throws IOException
split in class UpdateHandlerIOExceptionpublic String getName()
SolrInfoBeangetName in interface SolrInfoBeanpublic String getDescription()
SolrInfoBeangetDescription in interface SolrInfoBeanpublic SolrCoreState getSolrCoreState()
getSolrCoreState in class UpdateHandlerpublic CommitTracker getCommitTracker()
public CommitTracker getSoftCommitTracker()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.