Skip to content

Commit 62d13e9

Browse files
author
Christoph Büscher
authored
Remove rests of StandardHtmlStripAnalyzer (#43485)
StandardHtmlStripAnalyzer has been deprecated in 6.x and cannot be used for new indices from 7.0 on. This change removes it entirely and also removes the from tests and deprecation logging that has still been around during the 7.x versions.
1 parent 1a40777 commit 62d13e9

File tree

4 files changed

+0
-74
lines changed

4 files changed

+0
-74
lines changed

modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CommonAnalysisPlugin.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,6 @@ public Map<String, AnalysisProvider<TokenizerFactory>> getTokenizers() {
322322
@Override
323323
public List<PreBuiltAnalyzerProviderFactory> getPreBuiltAnalyzerProviderFactories() {
324324
List<PreBuiltAnalyzerProviderFactory> analyzers = new ArrayList<>();
325-
// TODO remove in 8.0
326-
analyzers.add(new PreBuiltAnalyzerProviderFactory("standard_html_strip", CachingStrategy.ELASTICSEARCH,
327-
() -> new StandardHtmlStripAnalyzer(CharArraySet.EMPTY_SET)));
328325
analyzers.add(new PreBuiltAnalyzerProviderFactory("pattern", CachingStrategy.ELASTICSEARCH,
329326
() -> new PatternAnalyzer(Regex.compile("\\W+" /*PatternAnalyzer.NON_WORD_PATTERN*/, null), true,
330327
CharArraySet.EMPTY_SET)));

modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StandardHtmlStripAnalyzer.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

modules/analysis-common/src/test/resources/rest-api-spec/test/analysis-common/20_analyzers.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@
6767
- length: { tokens: 1 }
6868
- match: { tokens.0.token: a1 b2 c3 d4 }
6969

70-
---
71-
"standard_html_strip":
72-
- do:
73-
catch: /\[standard_html_strip\] analyzer is not supported for new indices, use a custom analyzer using \[standard\] tokenizer and \[html_strip\] char_filter, plus \[lowercase\] filter/
74-
indices.analyze:
75-
body:
76-
text: <bold/> <italic/>
77-
analyzer: standard_html_strip
78-
7970
---
8071
"pattern":
8172
- do:

server/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,7 @@ public Analyzer getAnalyzer(String analyzer) throws IOException {
185185
throw new ElasticsearchException("failed to load analyzer for name " + key, ex);
186186
}}
187187
);
188-
} else if ("standard_html_strip".equals(analyzer)) {
189-
throw new IllegalArgumentException("[standard_html_strip] analyzer is not supported for new indices, " +
190-
"use a custom analyzer using [standard] tokenizer and [html_strip] char_filter, plus [lowercase] filter");
191188
}
192-
193189
return analyzerProvider.get(environment, analyzer).get();
194190
}
195191

0 commit comments

Comments
 (0)