[BUG] You can use BulkProcessor with high-level client in 5.6 version

Hi team,

Thanks in advance

I try to create a BulkProcessor like
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/5.6/java-rest-high-document-bulk.html

with the high-level client in the version 5.6 but I get this compilation error at this point:
...
RestHighLevelClient rHLClient
...
BulkProcessor bulkProcessor = BulkProcessor.builder(rHLClient::bulkAsync, listener,threadPool).build();

"Client is not a functional interface"

If there is a better way to use that, please advise. I've been blocked on it.

Thanks

J.

Not sure.

It looks correct to me.
May be share a sample project?

At least on 6.2, I don't have this issue.

Strange that there is a mention of Client which you don't have in your code.

Hi,
Thanks David,

I have to use 5.6 version. Do you know what kind of problem can produce this error?
In my search I found this:

Can you share an example with the 5.6 version?

Thanks in advance,

J.

I think this is a BUG
Please, any help with this will be welcome

thanks

As I said:

Hi David, thanks

I'm using internal repositories and specific gradle configuration. I saw a code you shared but it was under 6.x version.

thanks in advance

J.

I can't help if I can't reproduce the problem I'm afraid.

Thank you David

As I said: It was a bug, but not from elastic for sure

https://bugs.eclipse.org/bugs/show_bug.cgi?id=514884

interesting...

Thank you for your answers and patience

J.

Ha great!

I was confused by:

thanks in advance

And I thought you were waiting for something from my side.

Happy it's "solved" now.

1 Like

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