I have an Elasticsearch index which has _timestamp populated on every record. Using Marvel or curl I can get the _timestamp in the "fields" part of the result for example:
GET index/type/_search?fields=_timestamp,_source { "took": 11, "timed_out": false, "_shards": { "total": 3, "successful": 3, "failed": 0 }, "hits": { "total": 116888, "max_score": 1, "hits": [ { "_index": "index", "_type": "type", "_id": "mXJdWqSLSfykbMtChiCRjA", "_score": 1, "_source": { "results": "example", }, "fields": { "_timestamp": 1443618319514 } },... However when doing a search using the Java API I cant get it to return the _timestamp.
SearchRequestBuilder builder= client.prepareSearch(index) .addFacet(facet) .setFrom(start) .setSize(limit); SearchResponse response = builder.execute().actionGet(); Can anyone tell me how to ask for _timestamp too?