File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations
server/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change
1
+ pr : 96956
2
+ summary : Error message for misconfigured TSDB index
3
+ area : TSDB
4
+ type : bug
5
+ issues :
6
+ - 96445
Original file line number Diff line number Diff line change @@ -236,3 +236,20 @@ setup:
236
236
sum :
237
237
sum :
238
238
field : val
239
+ ---
240
+ " Configure with no synthetic source " :
241
+ - skip :
242
+ version : " - 8.8.99"
243
+ reason : " Error message fix in 8.9"
244
+
245
+ - do :
246
+ catch : ' /Time series indices only support synthetic source./'
247
+ indices.create :
248
+ index : tsdb_error
249
+ body :
250
+ settings :
251
+ mode : time_series
252
+ routing_path : [key]
253
+ mappings :
254
+ _source :
255
+ enabled : false
Original file line number Diff line number Diff line change @@ -137,7 +137,11 @@ private boolean isDefault() {
137
137
@ Override
138
138
public SourceFieldMapper build () {
139
139
if (enabled .getValue ().explicit () && mode .get () != null ) {
140
- throw new MapperParsingException ("Cannot set both [mode] and [enabled] parameters" );
140
+ if (indexMode == IndexMode .TIME_SERIES ) {
141
+ throw new MapperParsingException ("Time series indices only support synthetic source" );
142
+ } else {
143
+ throw new MapperParsingException ("Cannot set both [mode] and [enabled] parameters" );
144
+ }
141
145
}
142
146
if (isDefault ()) {
143
147
return indexMode == IndexMode .TIME_SERIES ? TSDB_DEFAULT : DEFAULT ;
You can’t perform that action at this time.
0 commit comments