Headache with RestHighLevelClient and bulkprocessor


(Derrick) #1

BulkProcessor.Builder builder = BulkProcessor.builder(client::bulkAsync, new BulkProcessorListener());

this line is complaining

The target type of this expression must be a functional interface

the error is this part: builder(client::bulkAsync,

any idea? please help

import org.elasticsearch.client.RestHighLevelClient;
RestHighLevelClient client;

environment: java 8, eclipse


BulkProcessor creation using RestHighLevelClient compilation error on ES5.6
(David Pilato) #2

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I don't see the full code. But anyway here is an example:


Settings to use with RestHighLevelClient and BulkProcessor
(gringogordo) #4

Hi,

probably not much help but I had the same error today using 5.6.3 (both low and high level). I switched to 6.0.0-rc2 and the error went away. I assume it works in 5.6.3 but it doesn't seem to want a HighLevelRestClient object but instead wants a Client. I don't pretend to understand this as I thought the Client was associated more with previous versions. Anyway I switched to 6.0.0-rc2 and it builds in line with dadoonets answer above. I can't quite understand what is needed in the Settings object though so i'm about to ask a similar question (hence finding this one)


(system) closed #5

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