Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving _ttl rebases the expiration date against now() instead of the value of _timestamp #11809

Closed
jpountz opened this issue Jun 22, 2015 · 5 comments
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

Comments

@jpountz
Copy link
Contributor

jpountz commented Jun 22, 2015

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 and now().

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.

@jpountz
Copy link
Contributor Author

jpountz commented Jun 22, 2015

It would be nice to have it fixed in 2.0 to make sure that all 2.0+ indices can be safely reindexed.

@s1monw
Copy link
Contributor

s1monw commented Jun 22, 2015

++

@nithyanv
Copy link

+1

@nozari
Copy link

nozari commented Oct 12, 2015

+1

@spinscale spinscale added v2.3.0 and removed v2.2.0 labels Dec 23, 2015
@clintongormley clintongormley added the :Search Foundations/Mapping Index mappings, including merging and defining field types label May 11, 2016
@clintongormley
Copy link
Contributor

Closing in favour of #18280

@javanna javanna added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

7 participants