-
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
[index.mode=time_series] requires a non-empty [index.routing_path] when creating component template #109149
Comments
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Is this an expected behaviour? |
Hey @rpasche, Apologies for the late reply here. I think this is expected behavior. A component template needs to be valid on its own. The time series index mode requires routing path to be configured. So in this case routing path should also be configured in this component template. Typically you would set the index.mode in an index template, since then there is complete view of what settings and mappings are available (from index template itself and other component templates) to be applied to a new data stream / backing index (when rolling over a data stream). Additionally, often you don't need to configure routing path, because the routing path can be determined from the fields marked as dimensions in the mapping. |
Hi @martijnvg , thank you for the answer.
I will need to test this again, but I think, I also had issues to only set |
If you set |
Hi @martijnvg I tried this. I somehow assume, that this might simply be caused by the dynamic template. (so there is - not yet - a real
The error
trying static mappingIt also does not work for me, if I have a static mapping
I get again
|
If you add the follow snippet to your index template, then it should work:
|
Oh....missed that. Will try |
Ok. With
it worked. Thanks. But this means, that |
Yes. Unless you configure the Do you have a particular reason why index.mode needs to be configured in a component template? Would defining it in an index template work too? I think we need to update the documentation and explain the relation between |
We are trying to "template" our index-templates as much as we can (also for our customers). The idea is to be able to "pick" all your "desired" component-template your index-template should be built of and go on. And one of those "desired" features the final "index" should have is to be a
something like this. Of course, we can also build the That's basically it. Thanks. |
Thanks for sharing this. The index.mode setting's dependency on index.routing_path setting isn't something that can be changed with how things work today. In your example, the component template that enabled time series mode, needs to include more information. Today this means you will need to include the index.routing_path setting and the mappings for the fields defined in the routing path. Maybe this can be made easier by also automatically generating the index.routing_path setting based on the mapping the component template. But at a minimum, time series index mode needs to know a subset of the dimensions. If time series index mode is enabled in a component template, then this information needs to be present in that component template. |
Elasticsearch Version
8.13.3
Installed Plugins
No response
Java Version
bundled
OS Version
Ubuntu
Problem Description
When trying to create a component template which should basically only set the
index.mode: "time_series"
, this results inI know, that
index.mode: "time_series"
needs further settings (that might need to come from other component templates).You get the same error, when you only try to create a component template, only setting
index.routing_path
(without specifyingindex.mode: "time_series"
within this component template.)This sounds like an error to me. It should be possible to set those settings or mapping separately in different component templates.
You could have several different component templates like this:
and use both component templates in the final index-template
It is - somehow - related to
"index.mode=time_series"
#91592Steps to Reproduce
Try to create a new component template
results in
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: