Created
April 25, 2014 16:17
-
-
Save nik9000/11294985 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/java/org/elasticsearch/index/analysis/DefaultAsCustom.java b/src/main/java/org/elasticsearch/index/analysis/DefaultAsCustom.java | |
new file mode 100644 | |
index 0000000..f3bf301 | |
+public interface DefaultAsCustom<T extends AnalyzerProvider> { | |
+ void build(XContentBuilder builder) throws IOException; | |
+} | |
diff --git a/src/main/java/org/elasticsearch/index/analysis/StandardAnalyzerProvider.java b/src/main/java/org/elasticsearch/index/analysis/StandardAnalyzerProvider.java | |
@@ -60,4 +63,11 @@ public class StandardAnalyzerProvider extends AbstractIndexAnalyzerProvider<Stan | |
public StandardAnalyzer get() { | |
return this.standardAnalyzer; | |
} | |
+ | |
+ public static class StandardDefaultAsCustom implements DefaultAsCustom<StandardAnalyzerProvider> { | |
+ @Override | |
+ public void build(XContentBuilder builder) throws IOException { | |
+ AnalyzerXContentUtil.buildAnalyzer(builder, "standard", "standard", "standard", "lowercase"); | |
+ } | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment