Skip to content

Commit

Permalink
Remove rests of StandardHtmlStripAnalyzer (#43485)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Christoph Büscher authored Jun 28, 2019
1 parent 1a40777 commit 62d13e9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,6 @@ public Map<String, AnalysisProvider<TokenizerFactory>> getTokenizers() {
@Override
public List<PreBuiltAnalyzerProviderFactory> getPreBuiltAnalyzerProviderFactories() {
List<PreBuiltAnalyzerProviderFactory> analyzers = new ArrayList<>();
// TODO remove in 8.0
analyzers.add(new PreBuiltAnalyzerProviderFactory("standard_html_strip", CachingStrategy.ELASTICSEARCH,
() -> new StandardHtmlStripAnalyzer(CharArraySet.EMPTY_SET)));
analyzers.add(new PreBuiltAnalyzerProviderFactory("pattern", CachingStrategy.ELASTICSEARCH,
() -> new PatternAnalyzer(Regex.compile("\\W+" /*PatternAnalyzer.NON_WORD_PATTERN*/, null), true,
CharArraySet.EMPTY_SET)));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@
- length: { tokens: 1 }
- match: { tokens.0.token: a1 b2 c3 d4 }

---
"standard_html_strip":
- do:
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/
indices.analyze:
body:
text: <bold/> <italic/>
analyzer: standard_html_strip

---
"pattern":
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,7 @@ public Analyzer getAnalyzer(String analyzer) throws IOException {
throw new ElasticsearchException("failed to load analyzer for name " + key, ex);
}}
);
} else if ("standard_html_strip".equals(analyzer)) {
throw new IllegalArgumentException("[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");
}

return analyzerProvider.get(environment, analyzer).get();
}

Expand Down

0 comments on commit 62d13e9

Please sign in to comment.