Error while doing suggest query for java-client

Regarding the java-client of suguest, the prompts need to be as follows when using:
Missing required property 'TermSuggestOption.score
Below is my code

SearchResponse<com.example.elasticsearch.generator.model.Test> search = -> request.
                 suggest(suggest -> suggest.
                         suggesters("title_suggest", value -> value.
                                 completion(v -> v.
                                 field("title")))), com.example.elasticsearch.generator.model.Test.class);

Error at compile time, how to solve this or my way is wrong

This code looks correct. What is the compilation error?

I don't know what's wrong with this

Ah right, it's a run time error, and not a compilation time error.

This issue has been identified: client failed to parse completion suggest response · Issue #57 · elastic/elasticsearch-java · GitHub

We're currently working on a fix that will be included in the next release.

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