title: Get all fields of a document in ElasticSearch search query
body: <p>How can I get all fields in documents matched by search query? ES documentation on <code>fields</code> says that using <code>*</code>, one can get all fields: <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html" rel="nofollow">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html</a></p>
  
  <p>Having this document and this query, I get hit in result, but no fields are returned:</p>
  
  <p>Put document:</p>
  
  <pre><code>curl -XPUT http://localhost:9200/idx/t/doc1 -d '{
    "f": "value"
  }'
  </code></pre>
  
  <p>Search it:</p>
  
  <pre><code>curl -XPOST http://localhost:9200/idx/_search?pretty -d '{
    "fields": "*",
    "query": { "term" : { "f" : "value" }}
  }'
  </code></pre>
  
  <p>I tried also <code>["*"]</code>, but the result is the same, only default fields (<code>_id</code> and <code>_type</code>) are returned. The hits part of response looks like this:</p>
  
  <pre><code>"hits" : {
      "total" : 1,
      "max_score" : 0.30685282,
      "hits" : [ {
        "_index" : "idx",
        "_type" : "t",
        "_id" : "doc1",
        "_score" : 0.30685282
      } ]
    }
  </code></pre>