I am trying to make an Elasticsearch search with Java and Elasticsearch. Elastic search provides API for Java and this is cool.
The thing is, I wish to create a method in Java who receives a string (properly, a JSON containing information for searching) who reflects this HTTP call to Elasticsearch
curl -X GET 'http://localhost:9200/geocon/_search?q=first:"Sonya"'
But I want this method as much general as possible.
So the question is: is it possible to parse and translate 1:1 HTTP request to Elasticsearch with Java API? Maybe giving to the Elasticsearch object just the JSON string as parameter?