3

I'm using Elasticsearch 5.1.1 in my project. After I send a search query via RESTful API, I can get a result JSON string from the cluster. I'm wondering if there is a convenient way to convert that JSON string to a Java object(such as SearchResponse or SearchHit provided in Elasticsearch package) so that I can fetch all result documents and some meta info easily?

I tried to use TransportClient provided by Elasticsearch itself. It can return the result as an SearchResponse object, but it seemed that it can only perform search via /_search API. What I expected to use is /_sql API provided by a SQL plugin. So how can I do this?

Trams
  • 239
  • 1
  • 3
  • 11

0 Answers0