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

_timestamp and _ttl still use legacy numerics #18280

Closed
jpountz opened this issue May 11, 2016 · 3 comments
Closed

_timestamp and _ttl still use legacy numerics #18280

jpountz opened this issue May 11, 2016 · 3 comments
Labels
blocker >breaking :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v5.0.0-alpha4

Comments

@jpountz
Copy link
Contributor

jpountz commented May 11, 2016

I just noticed that _timestamp and _ttl still use legacy numerics. We need to either forbid them on new indices (since they were deprecated in 2.0) or make them use points.

It is not strictly required to do it before 5.0 but that would be much better if 5.0 never created fields with legacy numerics.

@jpountz jpountz added blocker :Search Foundations/Mapping Index mappings, including merging and defining field types v5.0.0-alpha3 labels May 11, 2016
@jpountz
Copy link
Contributor Author

jpountz commented May 12, 2016

For the record, we had a quick chat with @rjernst about moving those to plugins, but it would require adding pluggability to the parsing of request parameters and the translog, which is probably something that we want to avoid (especially the latter).

@clintongormley
Copy link
Contributor

The _timestamp and _ttl fields were deprecated in 2.0.0-beta1 because they are problematic:

  • what does the _timestamp represent? a created date or a last-modified date or some other timestamp value?
  • should the _ttl be extended on update? what if an update happens after expiry?

etc etc. There are no right answers to these questions - they depend entirely on use case. Instead of providing these "opinionated features", we'd be better of just providing the primitives required for users to implement the logic they need.

We have these primitives in 5.0: ingest pipelines allow injecting a new timestamp at index time, delete-by-query is being moved back into core (#16883) for deletion of expired documents, and the update API allows updating the ttl and timestamp as the user sees fit.

We still need to be able to support indices created in 2.x in 5.x, but we should prevent new indices from enabling _ttl and _timestamp.

@clintongormley
Copy link
Contributor

Would be good to add deprecation logging in 2.x

jpountz added a commit to jpountz/elasticsearch that referenced this issue Jun 21, 2016
This removes the ability to use `_timestamp` and `_ttl` on indices created on
or after 5.0.

Closes elastic#18280
jpountz added a commit that referenced this issue Jun 22, 2016
This removes the ability to use `_timestamp` and `_ttl` on indices created on
or after 5.0.

Closes #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 >breaking :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v5.0.0-alpha4
Projects
None yet
Development

No branches or pull requests

3 participants