I recommend this old but gold advent post from 3 years ago: Dec 12th, 2018: [EN][Elasticsearch] Automatically adding a timestamp to documents
It shows how to use a pipeline that adds an ingest timestamp to every document you push. That's the most accurate way you can use and it allows you to lower the value for delay
. Note that by default lucene uses a refresh interval of 1s
, so you should not set delay
to a lower value, but e.g. use 2s
. Of course you can tweak this further, but I guess that should already meet recency requirements for most users.