What's the meaning of the underscore in the java api's methods, e.g., _toQuery()

_toQuery() is a public method that's used in examples on public docs (like Searching for documents | Elasticsearch Java API Client [8.13] | Elastic), so the method isn't internal - something the underscore sometimes represents.

So what is the significance of methods that start with underscore in the java api?

Just curious and kinda wondering if I should be avoiding them.

Hello!
The underscore methods in the java clients represent methods that don't come from the Elasticsearch APIs. They're not internal, they are utilities that the client provides, and the underscore is there to help distinguish them from Elasticsearch APIs methods with a similar name. You should definitely use them if needed :slight_smile:

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