Search in sources :

Example 1 with IndexOperation

use of org.opensearch.client.opensearch.core.bulk.IndexOperation in project data-prepper by opensearch-project.

the class JavaClientAccumulatingBulkRequestTest method createBulkOperation.

private BulkOperation createBulkOperation(Object document) {
    final IndexOperation indexOperation = mock(IndexOperation.class);
    when(indexOperation.document()).thenReturn(document);
    final BulkOperation bulkOperation = mock(BulkOperation.class);
    when(bulkOperation.isIndex()).thenReturn(true);
    when(bulkOperation.index()).thenReturn(indexOperation);
    return bulkOperation;
}
Also used : IndexOperation(org.opensearch.client.opensearch.core.bulk.IndexOperation) BulkOperation(org.opensearch.client.opensearch.core.bulk.BulkOperation)

Aggregations

BulkOperation (org.opensearch.client.opensearch.core.bulk.BulkOperation)1 IndexOperation (org.opensearch.client.opensearch.core.bulk.IndexOperation)1