Java Client API migration: FieldValue does not accept an Object value


the deprecated Java High Level REST Client API allowed to specify a Term query by providing the value as an Object (see QueryBuilders (server 7.8.1 API)

With the new Java Client API, it doesn't seem to be possible anymore, as there are way to provide an Object value to FieldValue.Builder

Are there any plan to add this previous capability to the new API ?

We want to avoid untyped Object as much as possible in the Java API client. Can you provide additional details on your use case? What is the actual type of the value you want to use?

My first goal is to be able to migrate our existing code as easily as possible, I wasn't expected features to be removed from the new API.

An example of types of values that I would like to use are related to date: Calendar / GregorianCalendar , Date, ...

The huge regression here is that the Elasticsearch API used to transform java types into their appropriate JSON representation for Elasticsearch by itself, and that we now have to handle that ourselves...

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