elasticsearch-java icon indicating copy to clipboard operation
elasticsearch-java copied to clipboard

Do we really need FieldValue in request?

Open Dyqer opened this issue 2 years ago • 1 comments

transport.search(request -> request
                            .index(indexName)
                            .query(query -> query
                                    .term(term -> term
                                            .field("testCaseId")
                                            .value(v -> v.stringValue(realValue)))), Void.class);

In HLRC, the type of value is Object, we write less code if omit the FieldValue Builder

Dyqer avatar Jan 24 '22 10:01 Dyqer

We want to provide strongly typed values in this client. Fields of type FieldValue will have additional overloaded setters for its variants in a future release.

swallez avatar Jan 24 '22 15:01 swallez

Closing this as it was fixed in more recent versions of the client, thank you for reporting this!

l-trotta avatar Feb 01 '24 16:02 l-trotta