title: elasticsearch wrapper query not works with base64 encoded string
body: <p><strong>elasticsearch wrapper query not works with base64 encoded string</strong></p>
  
  <p><strong>ES version : 5.2.3</strong></p>
  
  <p>To encode i have used base64:</p>
  
  <pre><code>char[] data = Base64Coder.encode(text.getBytes());
  
  return data.ToString();
  </code></pre>
  
  <p><strong>Note</strong>: text is the underline json query.</p>
  
  <p><strong>query</strong>:</p>
  
  <pre><code>curl -d XPOST 'http://localhost:9200/entitymaster_qa_t4/_search' -d '{
    "query" : {
      "wrapper" : {
        "query" : "W0NAMTZiN2MzYw=="
      }
    }
  }'
  </code></pre>
  
  <p><strong>Response</strong>:</p>
  
  <pre><code>{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"entitymaster_qa_t4","node":"8WVaVr9ATmaqOPDHGpNyHw","reason":{"type":"parse_exception","reason":"Failed to derive xcontent"}}]},"status":400}
  </code></pre>