title: Elasticsearch highlight: how to get entire text of the field in Java client
body: <p>I am new to Elasticsearch. I am hoping to get highlighted field in Java client. If I run the following query in Windows prompt:</p>
  
  <pre><code>{
      "query": {
          "filtered" : {
              "query" : {
                  "term" : {
                      "title" : "western"
                  }
              },
              "filter" : {
                  "term" : { "year" : 1961 }
              }
          }
      },
      "highlight" : {
          fields" : {
              "title" : {}
              }
          }
  }
  </code></pre>
  
  <p>I get nice highlighted text as follows:</p>
  
  <pre><code>{
        "_index" : "book",
        "_type" : "history",
        "_id" : "1",
        "_score" : 0.095891505,
        "_source":{ "title": "All Quiet on the Western great Front", "year": 1961}
        "highlight" : {
          "title" : [ "All Quiet on the &lt;em&gt;Western&lt;/em&gt; great Front dead" ]
        }
  }
  </code></pre>
  
  <p>The highlight </p>
  
  <pre><code>  "highlight" : {
      "title" : [ "All Quiet on the &lt;em&gt;Western&lt;/em&gt; great Front dead" ]
    }
  </code></pre>
  
  <p>can be easily converted into a Java Map object, and the "title" property contains the entire text of the matched field, which is really what I want.</p>
  
  <p>However, in Java client, I get highlighted fragments, which puts different segments of highlighted text of the same field into an array of text.</p>
  
  <p>Thanks and regards. </p>