Class IndexDocumentsBatch<T>


  • public class IndexDocumentsBatch<T>
    extends IndexBatchBase<T>
    Contains a batch of document write actions to send to the index.
    • Constructor Detail

    • Method Detail

      • addActions

        public IndexDocumentsBatch<T> addActions​(Iterable<IndexAction<T>> actions)
        Adds document index actions to the batch.
        Parameters:
        actions - Index actions.
        Returns:
        The updated IndexDocumentsBatch object.
      • addUploadActions

        public IndexDocumentsBatch<T> addUploadActions​(Iterable<T> documents)
        Adds upload document actions to the batch.
        Parameters:
        documents - Documents to be uploaded.
        Returns:
        The updated IndexDocumentsBatch object.
      • addDeleteActions

        public IndexDocumentsBatch<T> addDeleteActions​(Iterable<T> documents)
        Adds document delete actions to the batch.
        Parameters:
        documents - Document to be deleted.
        Returns:
        The updated IndexDocumentsBatch object.
      • addDeleteActions

        public IndexDocumentsBatch<T> addDeleteActions​(String keyName,
                                                       Iterable<String> keyValues)
        Adds document delete actions based on key IDs to the batch.
        Parameters:
        keyName - The key field name.
        keyValues - Keys of the documents to delete.
        Returns:
        The updated IndexDocumentsBatch object.
      • addMergeActions

        public IndexDocumentsBatch<T> addMergeActions​(Iterable<T> documents)
        Adds merge document actions to the batch.
        Parameters:
        documents - Documents to be merged.
        Returns:
        The updated IndexDocumentsBatch object.
      • addMergeOrUploadActions

        public IndexDocumentsBatch<T> addMergeOrUploadActions​(Iterable<T> documents)
        Adds merge or upload document actions to the batch.
        Parameters:
        documents - Documents to be merged or uploaded.
        Returns:
        The updated IndexDocumentsBatch object.