title: How to make an Elasticsearch query with a JSON in Java?
body: <p>I am trying to make an Elasticsearch search with <strong>Java</strong> and <strong>Elasticsearch</strong>. Elastic search provides API for Java and this is cool.</p>
  
  <p>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</p>
  
  <pre><code>curl -X GET 'http://localhost:9200/geocon/_search?q=first:"Sonya"'
  </code></pre>
  
  <p>But I want this method as much general as possible.</p>
  
  <p>So the question is: <strong>is it possible to parse and translate 1:1 HTTP request to Elasticsearch with Java API?</strong> Maybe giving to the Elasticsearch object just the JSON string as parameter?</p>