How to implement Search using Java API Client 8.1

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.

Documentation is currently in the works, see the github issues at Issues · elastic/elasticsearch-java · GitHub

In the meantime, if you have any issues, we're happy to help over here. I created a small sample project using the Elasticsearch client a while back, maybe that helps you as well GitHub - spinscale/elasticsearch-rest-client-samples: Elasticsearch REST client samples using Testcontainers

1 Like

Thanks @spinscale

I'm working on similar using Helidon framework, and can help with the documentation.

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