public interface IndexIndexer
An indexer scoped to a single index.
  • Method Details

    • add

      CompletableFuture<?> add(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.
      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 CompletableFuture that completes once the document is added.
    • addOrUpdate

      CompletableFuture<?> 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.
      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 CompletableFuture that completes once the document is updated.
    • delete

      CompletableFuture<?> delete(DocumentReferenceProvider referenceProvider, DocumentCommitStrategy commitStrategy, DocumentRefreshStrategy refreshStrategy, OperationSubmitter operationSubmitter)
      Delete a document from the index.
      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 CompletableFuture that completes once the document is deleted.