Skip to content
5 changes: 5 additions & 0 deletions docs/changelog/138265.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 138265
summary: Fix `index.mapping.pattern_text.disable_templating` not registered issue
area: Mapping
type: bug
issues: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

package org.elasticsearch.upgrades;

import com.carrotsearch.randomizedtesting.annotations.Name;

public class PatternTextRollingUpgradeIT extends AbstractStringTypeRollingUpgradeIT {

public PatternTextRollingUpgradeIT(@Name("upgradedNodes") int upgradedNodes) {
super(upgradedNodes);
}

@Override
public String stringType() {
return "pattern_text";
}

@Override
protected void testIndexing(boolean shouldIncludeKeywordMultiField) throws Exception {
assumeTrue("pattern_text only available from 9.2.0 onward", oldClusterHasFeature("gte_v9.2.0"));
super.testIndexing(shouldIncludeKeywordMultiField);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private static Parameter<NamedAnalyzer> analyzerParam(String name, Function<Fiel
* associated index setting, which is set from the current license status.
*/
private static Parameter<Boolean> disableTemplatingParameter(IndexSettings indexSettings) {
boolean forceDisable = indexSettings.getValue(DISABLE_TEMPLATING_SETTING);
boolean forceDisable = DISABLE_TEMPLATING_SETTING.get(indexSettings.getSettings());
return Parameter.boolParam(
"disable_templating",
false,
Expand Down