Meaning of packages with underscore in elastic-search Java language-client

What is the meaning of the underscore in the package names of the elasticsearch-java language-client?

We are migrating software that uses the Highlevel and low-level 7.x.y SDK's to the newer elasticsearch-java 8.x.y SDK.

At Elasticon Amsterdam I had a nice chat with David Pilato. He confirmed me that the way we approached the migration was right. Merci beaucoup David.

David suggested to ask in this discuss what the meaning of the _ is. More specifically everything under the package co.elastic.clients.elasticsearch._types

Is it somewhat private or not stable when upgrading a newer version?

See David Pilato's blog post for the core issues with converting:
Switching from the Java High Level Rest Client to the new Java API Client | Elastic Blog

1 Like

Hello!
We use underscores in the java client to easily tell apart Elasticsearch API methods from utility library methods. So for example search will call the matching Elasticsearch API, while _jsonpMapper() will call the utility method to return the configured JsonMapper. So no risk in using them at all!

3 Likes

And thank you for helping me fixing my demo project with much more appropriate java code :wink:

I still need to push the code :smiley:

1 Like