Update to elasticsearch 1.0.0.RC1

Closes #16.
This commit is contained in:
David Pilato 2014-01-10 23:23:07 +01:00
parent 51a96c1472
commit 4c935133e3
2 changed files with 10 additions and 10 deletions

View File

@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.elasticsearch</groupId> <groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-analysis-icu</artifactId> <artifactId>elasticsearch-analysis-icu</artifactId>
<version>1.14.0-SNAPSHOT</version> <version>2.0.0.RC1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<description>ICU Analysis for ElasticSearch</description> <description>ICU Analysis for ElasticSearch</description>
<inceptionYear>2009</inceptionYear> <inceptionYear>2009</inceptionYear>
@ -31,7 +31,7 @@
</parent> </parent>
<properties> <properties>
<elasticsearch.version>0.90.8</elasticsearch.version> <elasticsearch.version>1.0.0.RC1-SNAPSHOT</elasticsearch.version>
<lucene.version>4.6.0</lucene.version> <lucene.version>4.6.0</lucene.version>
<tests.jvms>1</tests.jvms> <tests.jvms>1</tests.jvms>
<tests.shuffle>true</tests.shuffle> <tests.shuffle>true</tests.shuffle>

View File

@ -24,7 +24,7 @@ import com.ibm.icu.text.RuleBasedCollator;
import com.ibm.icu.util.ULocale; import com.ibm.icu.util.ULocale;
import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.collation.ICUCollationKeyFilter; import org.apache.lucene.collation.ICUCollationKeyFilter;
import org.elasticsearch.ElasticSearchIllegalArgumentException; import org.elasticsearch.ElasticsearchIllegalArgumentException;
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.inject.assistedinject.Assisted; import org.elasticsearch.common.inject.assistedinject.Assisted;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
@ -63,15 +63,15 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
} catch (FailedToResolveConfigException e) { } catch (FailedToResolveConfigException e) {
failureToResolve = e; failureToResolve = e;
} catch (IOException e) { } catch (IOException e) {
throw new ElasticSearchIllegalArgumentException("Failed to load collation rules", e); throw new ElasticsearchIllegalArgumentException("Failed to load collation rules", e);
} }
try { try {
collator = new RuleBasedCollator(rules); collator = new RuleBasedCollator(rules);
} catch (Exception e) { } catch (Exception e) {
if (failureToResolve != null) { if (failureToResolve != null) {
throw new ElasticSearchIllegalArgumentException("Failed to resolve collation rules location", failureToResolve); throw new ElasticsearchIllegalArgumentException("Failed to resolve collation rules location", failureToResolve);
} else { } else {
throw new ElasticSearchIllegalArgumentException("Failed to parse collation rules", e); throw new ElasticsearchIllegalArgumentException("Failed to parse collation rules", e);
} }
} }
} else { } else {
@ -109,7 +109,7 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
} else if (strength.equalsIgnoreCase("identical")) { } else if (strength.equalsIgnoreCase("identical")) {
collator.setStrength(Collator.IDENTICAL); collator.setStrength(Collator.IDENTICAL);
} else { } else {
throw new ElasticSearchIllegalArgumentException("Invalid strength: " + strength); throw new ElasticsearchIllegalArgumentException("Invalid strength: " + strength);
} }
} }
@ -121,7 +121,7 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
} else if (decomposition.equalsIgnoreCase("canonical")) { } else if (decomposition.equalsIgnoreCase("canonical")) {
collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION); collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION);
} else { } else {
throw new ElasticSearchIllegalArgumentException("Invalid decomposition: " + decomposition); throw new ElasticsearchIllegalArgumentException("Invalid decomposition: " + decomposition);
} }
} }
@ -134,7 +134,7 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
} else if (alternate.equalsIgnoreCase("non-ignorable")) { } else if (alternate.equalsIgnoreCase("non-ignorable")) {
rbc.setAlternateHandlingShifted(false); rbc.setAlternateHandlingShifted(false);
} else { } else {
throw new ElasticSearchIllegalArgumentException("Invalid alternate: " + alternate); throw new ElasticsearchIllegalArgumentException("Invalid alternate: " + alternate);
} }
} }
@ -150,7 +150,7 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
} else if (caseFirst.equalsIgnoreCase("upper")) { } else if (caseFirst.equalsIgnoreCase("upper")) {
rbc.setUpperCaseFirst(true); rbc.setUpperCaseFirst(true);
} else { } else {
throw new ElasticSearchIllegalArgumentException("Invalid caseFirst: " + caseFirst); throw new ElasticsearchIllegalArgumentException("Invalid caseFirst: " + caseFirst);
} }
} }