Class ElasticsearchIndexWorkspace

java.lang.Object
org.hibernate.search.backend.elasticsearch.work.execution.impl.ElasticsearchIndexWorkspace
All Implemented Interfaces:
IndexWorkspace

public class ElasticsearchIndexWorkspace extends Object implements IndexWorkspace
  • Constructor Details

  • Method Details

    • mergeSegments

      public CompletableFuture<?> mergeSegments(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior unsupportedOperationBehavior)
      Description copied from interface: IndexWorkspace
      Merge all segments of the index into a single one.
      Specified by:
      mergeSegments in interface IndexWorkspace
      Parameters:
      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, 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: IndexWorkspace
      Delete documents that were indexed with any of the given routing keys, or all documents if the set of routing keys is empty.
      Specified by:
      purge in interface IndexWorkspace
      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 unsupportedOperationBehavior)
      Description copied from interface: IndexWorkspace
      Flush 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:
      flush in interface IndexWorkspace
      Parameters:
      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, or a completed stage if the operation is not supported.
    • refresh

      public CompletableFuture<?> refresh(OperationSubmitter operationSubmitter, UnsupportedOperationBehavior unsupportedOperationBehavior)
      Description copied from interface: IndexWorkspace
      Refresh the indexes so that all changes executed so far will be visible in search queries.
      Specified by:
      refresh in interface IndexWorkspace
      Parameters:
      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, or a completed stage if the operation is not supported.