I am using the following search query:

SearchRequestBuilder searchRequestBuilder = client.getClient() .prepareSearch("index_5589b14f3004fb6be70e4724") .setSearchType(SearchType.SCAN) .setScroll(new TimeValue(60000)) .setQuery(QueryStem(stem)) .addFields("field1", "field2") .setHighlighterPostTags("</em>") .setHighlighterPreTags("<em>") .addHighlightedField("field1", 20, 150) .addHighlightedField("field2", 20, 150) .setFrom(1) .setSize(1);

The equivalent version of the DSL is:

GET index_5589b14f3004fb6be70e4724/document_set/_search { "query": { // some query }, "fields": ["field1", "field2"], "highlight": { "pre_tags" : ["<em>"], "post_tags" : ["</em>"], "fields": { "field1": { "number_of_fragments": 10, "fragment_size": 20 }, "field2": { "number_of_fragments": 10, "fragment_size": 20 } } } }

I tried .getSource() in the Search response but it gave me the NullPointerException . Then I checked on Sense and found that it does not have any _source field. But if I add "_source": [...], to the Query DSL I get the required data I want.