public abstract class AbstractSolrIndexUpdateCommandHandlerImpl extends Object implements SolrIndexUpdateCommandHandler
| Constructor and Description |
|---|
AbstractSolrIndexUpdateCommandHandlerImpl(String commandGroup) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDocument(String collection,
org.apache.solr.common.SolrInputDocument doc)
Adds the document to the specified collection but does not issue a commit.
|
protected void |
addDocuments(String collection,
List<org.apache.solr.common.SolrInputDocument> docs)
Adds the documents to the specified collection but does not issue a commit.
|
protected void |
commit(String collectionName,
boolean waitFlush,
boolean waitSearcher,
boolean softCommit)
Issues a global commit command to Solr.
|
protected void |
deleteByIds(String collection,
List<String> ids)
Deletes items by ids.
|
protected void |
deleteByQueries(String collection,
List<String> queries)
Deletes items for the provided queries.
|
protected void |
deleteByQuery(String collection,
String query)
Deletes items for the provided query.
|
protected void |
executeCommandInternal(IncrementalUpdateCommand command)
By default, this will update the foreground collection.
|
protected void |
executeCommandInternal(IncrementalUpdateCommand command,
String collectionName)
This will apply updates in the specified collection, and will commit, when finished, if no errors occur.
|
protected void |
executeCommandInternalNoDefaultCommandType(SolrUpdateCommand command)
Hook point for implementors to handle new command types.
|
String |
getBackgroundCollectionName()
The background or "offline" collection (index) name or alias.
|
String |
getCommandGroup()
Command group or identifier for which this component can respond.
|
String |
getForegroundCollectionName()
The "live" or customer facing collection (index) name or alias.
|
protected abstract SolrConfiguration |
getSolrConfiguration() |
protected void |
rollback(String collectionName)
Issues a global rollback of all items that have not yet been committed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildDocument, buildDocument, executeCommandpublic AbstractSolrIndexUpdateCommandHandlerImpl(String commandGroup)
public String getCommandGroup()
SolrIndexUpdateCommandHandlergetCommandGroup in interface SolrIndexUpdateCommandHandlerprotected void executeCommandInternal(IncrementalUpdateCommand command) throws ServiceException
command - ServiceExceptionprotected void executeCommandInternal(IncrementalUpdateCommand command, String collectionName) throws ServiceException
command - collectionName - ServiceExceptionprotected void executeCommandInternalNoDefaultCommandType(SolrUpdateCommand command) throws ServiceException
command - ExceptionServiceExceptionprotected void commit(String collectionName, boolean waitFlush, boolean waitSearcher, boolean softCommit) throws Exception
collectionName - waitFlush - waitSearcher - softCommit - Exceptionprotected void rollback(String collectionName) throws Exception
collectionName - Exceptionprotected void addDocument(String collection, org.apache.solr.common.SolrInputDocument doc) throws Exception
collection - doc - Exceptionprotected void addDocuments(String collection, List<org.apache.solr.common.SolrInputDocument> docs) throws Exception
collection - docs - Exceptionprotected void deleteByQuery(String collection, String query) throws Exception
collection - query - Exceptionprotected void deleteByQueries(String collection, List<String> queries) throws Exception
collection - queries - Exceptionprotected void deleteByIds(String collection, List<String> ids) throws Exception
collection - ids - IOExceptionorg.apache.solr.client.solrj.SolrServerExceptionExceptionpublic String getForegroundCollectionName()
SolrIndexUpdateCommandHandlergetForegroundCollectionName in interface SolrIndexUpdateCommandHandlerpublic String getBackgroundCollectionName()
SolrIndexUpdateCommandHandlergetBackgroundCollectionName in interface SolrIndexUpdateCommandHandlerprotected abstract SolrConfiguration getSolrConfiguration()
Copyright © 2024. All rights reserved.