Retrieving _ttl
rebases the expiration date against now()
instead of the value of _timestamp
#11809
Labels
blocker
>bug
:Search Foundations/Mapping
Index mappings, including merging and defining field types
Team:Search Foundations
Meta label for the Search Foundations team in Elasticsearch
When you index a document with a
_ttl
, what we store/index internally is the expiration date, ie. the sum of_timestamp
and_ttl
. However when we retrieve the value of the_ttl
, we return the difference between the expiration date andnow()
.While this is useful to see in how long documents will be expired, it makes it impossible to reindex a document with the exact same expiration date. In my opinion, we should return the original value of the
_ttl
instead, since it is relative to the value of_timestamp
anyway.The text was updated successfully, but these errors were encountered: