Auto generate index.routing_path from mapping#86790
Auto generate index.routing_path from mapping#86790martijnvg merged 11 commits intoelastic:masterfrom
Conversation
11154a5 to
27c3ca8
Compare
27c3ca8 to
64fcfb8
Compare
nik9000
left a comment
There was a problem hiding this comment.
It makes sense to me. I'm not particularly worried about the overhead involved when validating templates. I think it's a fairly infrequent action - just on template PUT. Is that true?
| return Settings.EMPTY; | ||
| } | ||
|
|
||
| // Find fields in mapping that are of type keyword and time_series_dimension enabled. |
There was a problem hiding this comment.
I'd use javadoc for this. It'll show up when you mouseover the method in your IDE which is kind of nice.
| searchModule.getRequestCacheKeyDifferentiator() | ||
| ); | ||
|
|
||
| final var parameters = new IndexSettingProvider.Parameters(indicesService::createIndexMapperService); |
There was a problem hiding this comment.
While I'm thinking about it - could you make another PR that renames createIndexMapperService to createIndexMapperServiceForValidation or something? The name of the method feels so innocuous but it does a genuinely funny thing.
This will be used when creating a template (as part of validating), when simulating a template via simulate api and creation of a backing index of data stream. The latter will be the most frequent compared to the other two use cases and happens as part of creating a new data stream or rolling over a data stream. I still think that this is okay. |
|
Pinging @elastic/es-data-management (Team:Data Management) |
|
Pinging @jsoriano for awareness. |
Rename from `createIndexMapperService(...)`` to `createIndexMapperServiceForValidation(...)` Followup from elastic#86790
Rename from `createIndexMapperService(...)`` to `createIndexMapperServiceForValidation(...)` Followup from #86790
|
Thanks! |
If no
index.routing_pathhas been specified in the matching template or the component template that the template refers to then attempt to generate theindex.routing_pathindex setting from the matching template's mapping or component template the template refers to.Relates #74660