Support non-keyword dimensions as routing fields in TSDB#105501
Support non-keyword dimensions as routing fields in TSDB#105501kkrik-es merged 64 commits intoelastic:mainfrom
Conversation
# Conflicts: # server/src/test/java/org/elasticsearch/index/mapper/RootObjectMapperTests.java
# Conflicts: # modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/150_tsdb.yml
|
This is getting pretty long, I'm forking the |
# Conflicts: # modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java # server/src/main/java/org/elasticsearch/cluster/routing/IndexRouting.java # server/src/main/java/org/elasticsearch/index/IndexMode.java # server/src/main/java/org/elasticsearch/index/mapper/RoutingFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TimeSeriesRoutingHashFieldMapper.java # server/src/main/java/org/elasticsearch/index/mapper/TsidExtractingIdFieldMapper.java # server/src/test/java/org/elasticsearch/index/mapper/TimeSeriesIdFieldMapperTests.java # server/src/test/java/org/elasticsearch/indices/recovery/RecoverySourceHandlerTests.java
|
The forked PR is in, back to this. Changes are now limited to mappings, mostly. |
|
Pinging @elastic/es-search (Team:Search) |
| super(name); | ||
| } | ||
|
|
||
| void setDimension() { |
There was a problem hiding this comment.
maybe rename this method to enableDimension()?
There was a problem hiding this comment.
Hm that would be misleading, we want to mark that the mapper to be built will actually be a dimension, not that the builder is enabled to build a dimension (it is, de factor).
I really don't like the name though. This class creates objects that can build dimension fields but will not necessarily do. Any suggestions?
There was a problem hiding this comment.
It would be nice if we can move Parameter<Boolean> dimension into this builder, but that looks like a bigger refactoring to me.
So passthrough field mapper invokes setDimension() here and then other field mappers (keyword, number, etc.) can become dimensions. Maybe this method should be called inheritDimension()?
There was a problem hiding this comment.
Alright, switched to inheritDimensionParameterFromParentObject, more verbose for sure.
This is a follow-up on #103648, lifting the limitation that the pass-through object can contain only keyword fields if it's marked as time_series_dimension. In particular, fields included in the routing path no more need to be keywords.
#106080 included all required changes around routing. This change builds on top of it, including changes in mappings. In particular, it streamlines mapping eligibility as dimension fields.
Related to #103567