Skip to content

Commit 775c81b

Browse files
authored
Merge branch 'main' into ml-eis-integration-jbc
2 parents 2ce281f + b2879c3 commit 775c81b

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

muted-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,14 @@ tests:
300300
issue: https://github.com/elastic/elasticsearch/issues/115727
301301
- class: org.elasticsearch.xpack.security.authc.kerberos.KerberosAuthenticationIT
302302
issue: https://github.com/elastic/elasticsearch/issues/118414
303+
- class: org.elasticsearch.xpack.esql.qa.multi_node.EsqlClientYamlIT
304+
issue: https://github.com/elastic/elasticsearch/issues/119086
305+
- class: org.elasticsearch.xpack.spatial.index.query.ShapeQueryBuilderOverShapeTests
306+
method: testToQuery
307+
issue: https://github.com/elastic/elasticsearch/issues/119090
308+
- class: org.elasticsearch.xpack.spatial.index.query.GeoShapeQueryBuilderGeoShapeTests
309+
method: testToQuery
310+
issue: https://github.com/elastic/elasticsearch/issues/119091
303311

304312
# Examples:
305313
#

server/src/test/java/org/elasticsearch/indices/analysis/AnalysisModuleTests.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.elasticsearch.index.IndexService.IndexCreationContext;
2323
import org.elasticsearch.index.IndexSettings;
2424
import org.elasticsearch.index.IndexVersion;
25+
import org.elasticsearch.index.IndexVersions;
2526
import org.elasticsearch.index.analysis.Analysis;
2627
import org.elasticsearch.index.analysis.AnalysisRegistry;
2728
import org.elasticsearch.index.analysis.CharFilterFactory;
@@ -186,6 +187,34 @@ public void testUnderscoreInAnalyzerName() throws IOException {
186187
}
187188
}
188189

190+
public void testStandardFilterBWC() throws IOException {
191+
// standard tokenfilter should have been removed entirely in the 7x line. However, a
192+
// cacheing bug meant that it was still possible to create indexes using a standard
193+
// filter until 7.6
194+
{
195+
IndexVersion version = IndexVersionUtils.randomVersionBetween(random(), IndexVersions.V_7_6_0, IndexVersion.current());
196+
final Settings settings = Settings.builder()
197+
.put("index.analysis.analyzer.my_standard.tokenizer", "standard")
198+
.put("index.analysis.analyzer.my_standard.filter", "standard")
199+
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString())
200+
.put(IndexMetadata.SETTING_VERSION_CREATED, version)
201+
.build();
202+
IllegalArgumentException exc = expectThrows(IllegalArgumentException.class, () -> getIndexAnalyzers(settings));
203+
assertThat(exc.getMessage(), equalTo("The [standard] token filter has been removed."));
204+
}
205+
{
206+
IndexVersion version = IndexVersionUtils.randomVersionBetween(random(), IndexVersions.V_7_0_0, IndexVersions.V_7_5_2);
207+
final Settings settings = Settings.builder()
208+
.put("index.analysis.analyzer.my_standard.tokenizer", "standard")
209+
.put("index.analysis.analyzer.my_standard.filter", "standard")
210+
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString())
211+
.put(IndexMetadata.SETTING_VERSION_CREATED, version)
212+
.build();
213+
getIndexAnalyzers(settings);
214+
assertWarnings("The [standard] token filter is deprecated and will be removed in a future version.");
215+
}
216+
}
217+
189218
/**
190219
* Tests that plugins can register pre-configured char filters that vary in behavior based on Elasticsearch version, Lucene version,
191220
* and that do not vary based on version at all.

0 commit comments

Comments
 (0)