From de6dfe15a72b90ef2a50c75f95604165c0540dd6 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Wed, 6 Jan 2016 11:11:43 +0100 Subject: [PATCH] Add PathHierarchy type back to path_hierarchy tokenizer for backward compatibility with 1.x Closes #15785 --- .../java/org/elasticsearch/index/analysis/AnalysisRegistry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java b/core/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java index c833f41457e..1fd3a4d96b0 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java @@ -181,6 +181,7 @@ public final class AnalysisRegistry implements Closeable { tokenizers.put("standard", StandardTokenizerFactory::new); tokenizers.put("uax_url_email", UAX29URLEmailTokenizerFactory::new); tokenizers.put("path_hierarchy", PathHierarchyTokenizerFactory::new); + tokenizers.put("PathHierarchy", PathHierarchyTokenizerFactory::new); tokenizers.put("keyword", KeywordTokenizerFactory::new); tokenizers.put("letter", LetterTokenizerFactory::new); tokenizers.put("lowercase", LowerCaseTokenizerFactory::new); @@ -409,6 +410,7 @@ public final class AnalysisRegistry implements Closeable { // Tokenizer aliases tokenizerFactories.put("nGram", new PreBuiltTokenizerFactoryFactory(PreBuiltTokenizers.NGRAM.getTokenizerFactory(Version.CURRENT))); tokenizerFactories.put("edgeNGram", new PreBuiltTokenizerFactoryFactory(PreBuiltTokenizers.EDGE_NGRAM.getTokenizerFactory(Version.CURRENT))); + tokenizerFactories.put("PathHierarchy", new PreBuiltTokenizerFactoryFactory(PreBuiltTokenizers.PATH_HIERARCHY.getTokenizerFactory(Version.CURRENT))); // Token filters