-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Deprecate the path
option in the _timestamp
field
#9058
Comments
I like removing the
If we consider that the |
I think that this is probably true, but perhaps some users want auto-generated timestamps that are not related to |
Closed by #11794 |
This was suggested in #6730 (comment) but it feels like a separate discussion, so I've opened this issue.
Removing the
path
parameter from_routing
and_id
has real benefits: we don't have to parse the body of the document on the coordinating node just to figure out which node should handle an indexing request. However, the_timestamp
field doesn't have the same issue.Currently the
_timestamp
field has two uses:_ttl
functionalityIf you're not using
_ttl
then it makes no sense extracting the_timestamp
from a field in your document. Just query the field directly instead of making a redundant copy of it.For auto-generated timestamps, I think you probably always want them to be auto-generated, or you always want to provide them yourself. So having logic to extract the timestamp from a field, and auto-generate a value if one isn't provided feels pretty much redundant.
The options are:
path
option from_timestamp
The
_timestamp
field will primarily be used with auto-generated timestamps. If the user wants to use the_ttl
feature with a predefined timestamp, then they should specify that value manually at index/update time, with?timestamp=...
path
option to the_ttl
The
_ttl
will use the auto-generated_timestamp
field by default, but can access a field within the document body instead (and fall back to an auto-generated value if none is specified). This option rather complicates things: what if the user uses the_timestamp
field AND a_ttl.path
?The text was updated successfully, but these errors were encountered: