You can get the latest document by using "top hits" metric. In the example below I am using a top hits metric aggregation to show the timestamp field for the last document sorted on the timestamp field.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.