Class LuceneIndexWorkspace
java.lang.Object
org.hibernate.search.backend.lucene.work.execution.impl.LuceneIndexWorkspace
- All Implemented Interfaces:
IndexWorkspace
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneIndexWorkspace(LuceneWorkFactory factory, WorkExecutionIndexManagerContext indexManagerContext, Set<String> tenantIds) -
Method Summary
Modifier and TypeMethodDescriptionflush(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior ignored) Flush to disk the changes to the index that were not committed yet.mergeSegments(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior ignored) Merge all segments of the index into a single one.purge(Set<String> routingKeys, OperationSubmitter operationSubmitter, UnsupportedOperationBehavior unsupportedOperationBehavior) Delete documents that were indexed with any of the given routing keys, or all documents if the set of routing keys is empty.refresh(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior ignored) Refresh the indexes so that all changes executed so far will be visible in search queries.
-
Constructor Details
-
LuceneIndexWorkspace
public LuceneIndexWorkspace(LuceneWorkFactory factory, WorkExecutionIndexManagerContext indexManagerContext, Set<String> tenantIds)
-
-
Method Details
-
mergeSegments
public CompletableFuture<?> mergeSegments(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior ignored) Description copied from interface:IndexWorkspaceMerge all segments of the index into a single one.- Specified by:
mergeSegmentsin interfaceIndexWorkspace- Parameters:
operationSubmitter- The behavior to adopt when submitting the operation to a full queue/executor.ignored- The behavior to adopt if the operation is not supported in this index.- Returns:
- A completion stage for the executed operation, or a completed stage if the operation is not supported.
-
purge
public CompletableFuture<?> purge(Set<String> routingKeys, OperationSubmitter operationSubmitter, UnsupportedOperationBehavior unsupportedOperationBehavior) Description copied from interface:IndexWorkspaceDelete documents that were indexed with any of the given routing keys, or all documents if the set of routing keys is empty.- Specified by:
purgein interfaceIndexWorkspace- Parameters:
routingKeys- The set of routing keys. If non-empty, only documents that were indexed with these routing keys will be deleted. If empty, documents will be deleted regardless of their routing key.operationSubmitter- The behavior to adopt when submitting the operation to a full queue/executor.unsupportedOperationBehavior- The behavior to adopt if the operation is not supported in this index.- Returns:
- A completion stage for the executed operation.
-
flush
public CompletableFuture<?> flush(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior ignored) Description copied from interface:IndexWorkspaceFlush to disk the changes to the index that were not committed yet.In the case of backends with a transaction log (Elasticsearch), also apply operations from the transaction log that were not applied yet.
- Specified by:
flushin interfaceIndexWorkspace- Parameters:
operationSubmitter- The behavior to adopt when submitting the operation to a full queue/executor.ignored- The behavior to adopt if the operation is not supported in this index.- Returns:
- A completion stage for the executed operation, or a completed stage if the operation is not supported.
-
refresh
public CompletableFuture<?> refresh(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior ignored) Description copied from interface:IndexWorkspaceRefresh the indexes so that all changes executed so far will be visible in search queries.- Specified by:
refreshin interfaceIndexWorkspace- Parameters:
operationSubmitter- The behavior to adopt when submitting the operation to a full queue/executor.ignored- The behavior to adopt if the operation is not supported in this index.- Returns:
- A completion stage for the executed operation, or a completed stage if the operation is not supported.
-