|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.solr.update.UpdateHandler
org.apache.solr.update.DirectUpdateHandler2
public class DirectUpdateHandler2
TODO: add soft commitWithin support
DirectUpdateHandler2 implements an UpdateHandler where documents are added
directly to the main Lucene index as opposed to adding to a separate smaller index.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean |
|---|
SolrInfoMBean.Category |
| Field Summary | |
|---|---|
protected Lock |
commitLock
|
static boolean |
commitOnClose
|
protected CommitTracker |
commitTracker
|
protected CommitTracker |
softCommitTracker
|
protected SolrCoreState |
solrCoreState
|
| Fields inherited from class org.apache.solr.update.UpdateHandler |
|---|
commitCallbacks, core, idField, idFieldType, log, optimizeCallbacks, schema, softCommitCallbacks, ulog |
| Constructor Summary | |
|---|---|
DirectUpdateHandler2(SolrCore core)
|
|
DirectUpdateHandler2(SolrCore core,
UpdateHandler updateHandler)
|
|
| Method Summary | |
|---|---|
int |
addDoc(AddUpdateCommand cmd)
|
void |
clearIndex()
|
void |
close()
|
void |
closeWriter(IndexWriter writer)
|
void |
commit(CommitUpdateCommand cmd)
|
void |
decref()
Called when a SolrCore using this UpdateHandler is closed. |
void |
delete(DeleteUpdateCommand cmd)
|
void |
deleteByQuery(DeleteUpdateCommand cmd)
|
SolrInfoMBean.Category |
getCategory()
Purpose of this Class |
CommitTracker |
getCommitTracker()
|
String |
getDescription()
Simple one or two line description |
URL[] |
getDocs()
Documentation URL list. |
String |
getName()
Simple common usage name, e.g. |
CommitTracker |
getSoftCommitTracker()
|
SolrCoreState |
getSolrCoreState()
|
String |
getSource()
CVS Source, SVN Source, etc |
NamedList |
getStatistics()
Any statistics this instance would like to be publicly available via the Solr Administration interface. |
UpdateLog |
getUpdateLog()
|
String |
getVersion()
Simple common usage version, e.g. |
void |
incref()
Called when this UpdateHandler is shared with another SolrCore. |
int |
mergeIndexes(MergeIndexesCommand cmd)
|
void |
newIndexWriter(boolean rollback)
Called when the Writer should be opened again - eg when replication replaces all of the index files. |
void |
prepareCommit(CommitUpdateCommand cmd)
|
void |
rollback(RollbackUpdateCommand cmd)
|
protected void |
rollbackWriter()
|
void |
split(SplitIndexCommand cmd)
|
String |
toString()
|
| Methods inherited from class org.apache.solr.update.UpdateHandler |
|---|
callPostCommitCallbacks, callPostOptimizeCallbacks, callPostSoftCommitCallbacks, registerCommitCallback, registerOptimizeCallback, registerSoftCommitCallback |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final SolrCoreState solrCoreState
protected final Lock commitLock
protected final CommitTracker commitTracker
protected final CommitTracker softCommitTracker
public static boolean commitOnClose
| Constructor Detail |
|---|
public DirectUpdateHandler2(SolrCore core)
public DirectUpdateHandler2(SolrCore core,
UpdateHandler updateHandler)
| Method Detail |
|---|
protected void rollbackWriter()
throws IOException
IOException
public int addDoc(AddUpdateCommand cmd)
throws IOException
addDoc in class UpdateHandlerIOException
public void delete(DeleteUpdateCommand cmd)
throws IOException
delete in class UpdateHandlerIOException
public void clearIndex()
throws IOException
IOException
public void deleteByQuery(DeleteUpdateCommand cmd)
throws IOException
deleteByQuery in class UpdateHandlerIOException
public int mergeIndexes(MergeIndexesCommand cmd)
throws IOException
mergeIndexes in class UpdateHandlerIOException
public void prepareCommit(CommitUpdateCommand cmd)
throws IOException
IOException
public void commit(CommitUpdateCommand cmd)
throws IOException
commit in class UpdateHandlerIOException
public void newIndexWriter(boolean rollback)
throws IOException
UpdateHandler
newIndexWriter in class UpdateHandlerrollback - IndexWriter if true else close
IOException - 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 UpdateHandler
public void close()
throws IOException
close in class UpdateHandlerIOException
public void closeWriter(IndexWriter writer)
throws IOException
closeWriter in interface SolrCoreState.IndexWriterCloserIOException
public void split(SplitIndexCommand cmd)
throws IOException
split in class UpdateHandlerIOExceptionpublic String getName()
SolrInfoMBean
getName in interface SolrInfoMBeanpublic String getVersion()
SolrInfoMBean
getVersion in interface SolrInfoMBeanpublic String getDescription()
SolrInfoMBean
getDescription in interface SolrInfoMBeanpublic SolrInfoMBean.Category getCategory()
SolrInfoMBean
getCategory in interface SolrInfoMBeanpublic String getSource()
SolrInfoMBean
getSource in interface SolrInfoMBeanpublic URL[] getDocs()
SolrInfoMBeanSuggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...
getDocs in interface SolrInfoMBeanpublic NamedList getStatistics()
SolrInfoMBean
Any Object type may be stored in the list, but only the
toString() representation will be used.
getStatistics in interface SolrInfoMBeanpublic String toString()
toString in class Objectpublic SolrCoreState getSolrCoreState()
getSolrCoreState in class UpdateHandlerpublic void decref()
UpdateHandler
decref in class UpdateHandlerpublic void incref()
UpdateHandler
incref in class UpdateHandlerpublic CommitTracker getCommitTracker()
public CommitTracker getSoftCommitTracker()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||