From f44ef93d38bb8d1588fe8990f9d0e4c89091d2b8 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Fri, 10 Jan 2014 23:42:48 +0100 Subject: [PATCH] Update to elasticsearch 1.0.0.RC1 Closes #17. --- pom.xml | 4 ++-- .../index/analysis/PhoneticTokenFilterFactory.java | 8 ++++---- .../index/analysis/SimplePhoneticAnalysisTests.java | 3 --- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 7294c5d085e..a8d07c19157 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 org.elasticsearch elasticsearch-analysis-phonetic - 1.9.0-SNAPSHOT + 2.0.0.RC1-SNAPSHOT jar Phonetic Analysis for ElasticSearch 2009 @@ -31,7 +31,7 @@ - 0.90.8 + 1.0.0.RC1-SNAPSHOT 4.6.0 1 true diff --git a/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java b/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java index 02c4803d02d..479ea1ae899 100644 --- a/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java +++ b/src/main/java/org/elasticsearch/index/analysis/PhoneticTokenFilterFactory.java @@ -29,7 +29,7 @@ import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.phonetic.BeiderMorseFilter; import org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter; import org.apache.lucene.analysis.phonetic.PhoneticFilter; -import org.elasticsearch.ElasticSearchIllegalArgumentException; +import org.elasticsearch.ElasticsearchIllegalArgumentException; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.assistedinject.Assisted; import org.elasticsearch.common.settings.Settings; @@ -90,7 +90,7 @@ public class PhoneticTokenFilterFactory extends AbstractTokenFilterFactory { } else if ("exact".equalsIgnoreCase(ruleType)) { ruletype = RuleType.EXACT; } else { - throw new ElasticSearchIllegalArgumentException("No matching rule type [" + ruleType + "] for beider morse encoder"); + throw new ElasticsearchIllegalArgumentException("No matching rule type [" + ruleType + "] for beider morse encoder"); } String nameType = settings.get("name_type", "generic"); if ("GENERIC".equalsIgnoreCase(nameType)) { @@ -107,7 +107,7 @@ public class PhoneticTokenFilterFactory extends AbstractTokenFilterFactory { } else if ("nysiis".equalsIgnoreCase(encodername)) { this.encoder = new Nysiis(); } else { - throw new ElasticSearchIllegalArgumentException("unknown encoder [" + encodername + "] for phonetic token filter"); + throw new ElasticsearchIllegalArgumentException("unknown encoder [" + encodername + "] for phonetic token filter"); } } @@ -127,6 +127,6 @@ public class PhoneticTokenFilterFactory extends AbstractTokenFilterFactory { } else { return new PhoneticFilter(tokenStream, encoder, !replace); } - throw new ElasticSearchIllegalArgumentException("encoder error"); + throw new ElasticsearchIllegalArgumentException("encoder error"); } } diff --git a/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java b/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java index 70f69fdbced..d3aa66b451f 100644 --- a/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java +++ b/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java @@ -45,10 +45,7 @@ public class SimplePhoneticAnalysisTests extends ElasticsearchTestCase { public void testPhoneticTokenFilterFactory() { Settings settings = settingsBuilder().loadFromClasspath("org/elasticsearch/index/analysis/phonetic-1.yml").build(); AnalysisService analysisService = testSimpleConfiguration(settings); - TokenFilterFactory standardfilterFactory = analysisService.tokenFilter("standard"); - System.err.println("standard filterfactory = " + standardfilterFactory); TokenFilterFactory filterFactory = analysisService.tokenFilter("phonetic"); - System.err.println("filterfactory = " + filterFactory); MatcherAssert.assertThat(filterFactory, instanceOf(PhoneticTokenFilterFactory.class)); }