The docs here Elasticsearch Java API Client [8.1] | Elastic do not have clear examples of using the Java API Client. Although I can view the docs for all the available classes Overview (java-client 8.1.1 API) but not sure which one to use.
There are some snippets here Creating API objects from JSON data | Elasticsearch Java API Client [8.1] | Elastic but not complete.
On the internet (and stack overflow) there are several implementations detailed (SearchRequest Builder, Search Request, Search Response, Query Builder etc.). I would like to implement a basic search and extend that.
Would appreciate if a doc or an official example details the correct way.