diff --git a/docs/reference/analysis/analyzers/custom-analyzer.asciidoc b/docs/reference/analysis/analyzers/custom-analyzer.asciidoc index 012045153b3..bdc03a0998b 100644 --- a/docs/reference/analysis/analyzers/custom-analyzer.asciidoc +++ b/docs/reference/analysis/analyzers/custom-analyzer.asciidoc @@ -5,7 +5,7 @@ An analyzer of type `custom` that allows to combine a `Tokenizer` with zero or more `Token Filters`, and zero or more `Char Filters`. The custom analyzer accepts a logical/registered name of the tokenizer to use, and a list of logical/registered names of token filters. -The name of the custom analyzer must not start mit "_". +The name of the custom analyzer must not start with "_". The following are settings that can be set for a `custom` analyzer type: diff --git a/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java b/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java index 53cdbfde4ae..1cc37b8cda8 100644 --- a/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java +++ b/src/main/java/org/elasticsearch/index/analysis/AnalysisService.java @@ -253,7 +253,7 @@ public class AnalysisService extends AbstractIndexComponent implements Closeable for (Map.Entry analyzer : analyzers.entrySet()) { if (analyzer.getKey().startsWith("_")) { - throw new IllegalArgumentException("analyzer name must not start with _. got \"" + analyzer.getKey() + "\""); + throw new IllegalArgumentException("analyzer name must not start with '_'. got \"" + analyzer.getKey() + "\""); } } this.analyzers = ImmutableMap.copyOf(analyzers);