# \[6.1\] BulkProcessor and HighLevelRestClient

**URL:** <https://discuss.elastic.co/t/6-1-bulkprocessor-and-highlevelrestclient/114754>\
**Category:** Elasticsearch\
**Created:** [January 9, 2018, 8:38pm UTC](https://discuss.elastic.co/t/6-1-bulkprocessor-and-highlevelrestclient/114754 "2018-01-09T20:38:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![macgngsta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/macgngsta/32/26396_2.png) [@macgngsta](https://discuss.elastic.co/u/macgngsta)\
**Post date:** [January 9, 2018, 8:38pm UTC](https://discuss.elastic.co/t/6-1-bulkprocessor-and-highlevelrestclient/114754/1 "2018-01-09T20:38:32Z")

</div>

In the documentation [Using Bulk Processor](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs-bulk-processor.html), the following snippet is provided:

```auto
BulkProcessor bulkProcessor = BulkProcessor.builder(client, new BulkProcessor.Listener() { /* Listener methods */ })
.setBulkActions(10000)
.setConcurrentRequests(0)
.build();

```

and it requires the Client interface.

but in the [High Level Rest Client](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.1/java-rest-high.html) 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](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.1/java-rest-high-supported-apis.html) lists Bulk API as supported.

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 9, 2018, 8:56pm UTC](https://discuss.elastic.co/t/6-1-bulkprocessor-and-highlevelrestclient/114754/2 "2018-01-09T20:56:41Z")

</div>

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](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](https://github.com/dadoonet/legacy-search/blob/02-bulk/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java)

---

<div class="post-metadata">

**Author:** ![macgngsta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/macgngsta/32/26396_2.png) [@macgngsta](https://discuss.elastic.co/u/macgngsta)\
**Post date:** [January 9, 2018, 9:05pm UTC](https://discuss.elastic.co/t/6-1-bulkprocessor-and-highlevelrestclient/114754/3 "2018-01-09T21:05:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 6, 2018, 9:12pm UTC](https://discuss.elastic.co/t/6-1-bulkprocessor-and-highlevelrestclient/114754/4 "2018-02-06T21:12:33Z")

</div>

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