Interface SolrIndexUpdateService
- All Known Subinterfaces:
CatalogSolrIndexUpdateService
- All Known Implementing Classes:
AbstractSolrIndexUpdateServiceImpl,CatalogSolrIndexUpdateServiceImpl
public interface SolrIndexUpdateService
This is the entry point for issuing commands to update Solr indexes / collections.
- Author:
- Kelly Tisdell
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.solr.common.SolrInputDocumentbuildDocument(Indexable indexable) Provides an interface for a caller to convert anIndexableinto aSolrInputDocument.org.apache.solr.common.SolrInputDocumentbuildDocument(Indexable indexable, List<IndexField> fields, List<Locale> locales) Provides an interface for a caller to convert anIndexableinto aSolrInputDocument.voidDefault behavior is to truncate the background collection (offline index), populate it with documents, commit, and then swap (re-alias) so that it becomes the foreground collection and the foreground collection becomes the background.voidupdateIndex(List<org.apache.solr.common.SolrInputDocument> documents) This is for relatively small, autonomous, incremental updates to the main (customer-facing) foreground Solr collection / index.voidupdateIndex(List<org.apache.solr.common.SolrInputDocument> documents, List<String> deleteQueries) This is for relatively small, autonomous, incremental updates to the main (customer-facing) foreground Solr collection / index.
-
Method Details
-
rebuildIndex
Default behavior is to truncate the background collection (offline index), populate it with documents, commit, and then swap (re-alias) so that it becomes the foreground collection and the foreground collection becomes the background.- Throws:
ServiceException
-
updateIndex
This is for relatively small, autonomous, incremental updates to the main (customer-facing) foreground Solr collection / index.Writes the documents to the foreground collection / index. Then issues a commit.
This should not be used for incremental indexing in the context of a larger indexing scope or operation.
- Parameters:
documents-- Throws:
ServiceException
-
updateIndex
void updateIndex(List<org.apache.solr.common.SolrInputDocument> documents, List<String> deleteQueries) throws ServiceException This is for relatively small, autonomous, incremental updates to the main (customer-facing) foreground Solr collection / index.Executes the delete queries, if any, in the foreground index. Then writes the documents, if any, to the foreground index. Then commits if no errors occur.
This should not be used for incremental indexing in the context of a larger indexing scope or operation.
- Parameters:
documents-deleteQueries-- Throws:
ServiceException
-
buildDocument
Provides an interface for a caller to convert anIndexableinto aSolrInputDocument. This may return null if the implementor does not want the specifiedIndexableindexed.- Parameters:
indexable-- Returns:
-
buildDocument
org.apache.solr.common.SolrInputDocument buildDocument(Indexable indexable, List<IndexField> fields, List<Locale> locales) Provides an interface for a caller to convert anIndexableinto aSolrInputDocument. This may return null if the implementor does not want the specifiedIndexableindexed.- Parameters:
indexable-fields-locales-- Returns:
-