[6.1] BulkProcessor and HighLevelRestClient

In the documentation Using Bulk Processor, the following snippet is provided:

BulkProcessor bulkProcessor = BulkProcessor.builder(client, new BulkProcessor.Listener() { /* Listener methods */ })

and it requires the Client interface.

but in the High Level Rest Client it says that we should be using the high level rest client, which does not implement the Client interface. neither does the .getLowLevelClient

Supported APIs lists Bulk API as supported.

if we want to use the BulkProcessor, does that mean that we revert back to the TransportClient?

Did you read https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-document-bulk.html#java-rest-high-document-bulk-processor

Example here: https://github.com/dadoonet/legacy-search/blob/02-bulk/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java

1 Like

Example helped.
My problem was that I was on Java 1.7 instead of 1.8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.