I have a cluster with documents that contains timestamp field.
How can i request for the last arrived of them?
A query like the one below should do the trick. It'll get you the one document with the latest date in the timestamp
field.
{
"size": 1,
"query": {
"match_all": {}
},
"sort": {
"timestamp": "desc"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With