Class ElasticsearchIndexIndexer
java.lang.Object
org.hibernate.search.backend.elasticsearch.work.execution.impl.ElasticsearchIndexIndexer
- All Implemented Interfaces:
IndexIndexer
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchIndexIndexer(ElasticsearchWorkFactory workFactory, ElasticsearchSerialWorkOrchestrator orchestrator, WorkExecutionIndexManagerContext indexManagerContext, BackendSessionContext sessionContext) -
Method Summary
Modifier and TypeMethodDescriptionadd(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter) Add a document to the index, assuming that the document is absent from the index.addOrUpdate(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter) Update a document in the index, or add it if it's absent from the index.delete(DocumentReferenceProvider referenceProvider, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter) Delete a document from the index.
-
Constructor Details
-
ElasticsearchIndexIndexer
public ElasticsearchIndexIndexer(ElasticsearchWorkFactory workFactory, ElasticsearchSerialWorkOrchestrator orchestrator, WorkExecutionIndexManagerContext indexManagerContext, BackendSessionContext sessionContext)
-
-
Method Details
-
add
public CompletableFuture<?> add(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter) Description copied from interface:IndexIndexerAdd a document to the index, assuming that the document is absent from the index.- Specified by:
addin interfaceIndexIndexer- Parameters:
referenceProvider- A source of information about the identity of the document to add.documentContributor- A contributor to the document, adding fields to the indexed document.commitStrategy- How to handle the commit.refreshStrategy- How to handle the refresh.operationSubmitter- How to handle request to submit operation when the queue is full- Returns:
- A
CompletableFuturethat completes once the document is added.
-
addOrUpdate
public CompletableFuture<?> addOrUpdate(DocumentReferenceProvider referenceProvider, DocumentContributor documentContributor, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter) Description copied from interface:IndexIndexerUpdate a document in the index, or add it if it's absent from the index.- Specified by:
addOrUpdatein interfaceIndexIndexer- Parameters:
referenceProvider- A source of information about the identity of the document to update.documentContributor- A contributor to the document, adding fields to the indexed document.commitStrategy- How to handle the commit.refreshStrategy- How to handle the refresh.operationSubmitter- How to handle request to submit operation when the queue is full- Returns:
- A
CompletableFuturethat completes once the document is updated.
-
delete
public CompletableFuture<?> delete(DocumentReferenceProvider referenceProvider, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter) Description copied from interface:IndexIndexerDelete a document from the index.- Specified by:
deletein interfaceIndexIndexer- Parameters:
referenceProvider- A source of information about the identity of the document to delete.commitStrategy- How to handle the commit.refreshStrategy- How to handle the refresh.operationSubmitter- How to handle request to submit operation when the queue is full- Returns:
- A
CompletableFuturethat completes once the document is deleted.
-