parent
51a96c1472
commit
4c935133e3
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-analysis-icu</artifactId>
|
||||
<version>1.14.0-SNAPSHOT</version>
|
||||
<version>2.0.0.RC1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<description>ICU Analysis for ElasticSearch</description>
|
||||
<inceptionYear>2009</inceptionYear>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<elasticsearch.version>0.90.8</elasticsearch.version>
|
||||
<elasticsearch.version>1.0.0.RC1-SNAPSHOT</elasticsearch.version>
|
||||
<lucene.version>4.6.0</lucene.version>
|
||||
<tests.jvms>1</tests.jvms>
|
||||
<tests.shuffle>true</tests.shuffle>
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.ibm.icu.text.RuleBasedCollator;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
import org.apache.lucene.analysis.TokenStream;
|
||||
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.assistedinject.Assisted;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
@ -63,15 +63,15 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||
} catch (FailedToResolveConfigException e) {
|
||||
failureToResolve = e;
|
||||
} catch (IOException e) {
|
||||
throw new ElasticSearchIllegalArgumentException("Failed to load collation rules", e);
|
||||
throw new ElasticsearchIllegalArgumentException("Failed to load collation rules", e);
|
||||
}
|
||||
try {
|
||||
collator = new RuleBasedCollator(rules);
|
||||
} catch (Exception e) {
|
||||
if (failureToResolve != null) {
|
||||
throw new ElasticSearchIllegalArgumentException("Failed to resolve collation rules location", failureToResolve);
|
||||
throw new ElasticsearchIllegalArgumentException("Failed to resolve collation rules location", failureToResolve);
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("Failed to parse collation rules", e);
|
||||
throw new ElasticsearchIllegalArgumentException("Failed to parse collation rules", e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -109,7 +109,7 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||
} else if (strength.equalsIgnoreCase("identical")) {
|
||||
collator.setStrength(Collator.IDENTICAL);
|
||||
} 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")) {
|
||||
collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION);
|
||||
} 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")) {
|
||||
rbc.setAlternateHandlingShifted(false);
|
||||
} 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")) {
|
||||
rbc.setUpperCaseFirst(true);
|
||||
} else {
|
||||
throw new ElasticSearchIllegalArgumentException("Invalid caseFirst: " + caseFirst);
|
||||
throw new ElasticsearchIllegalArgumentException("Invalid caseFirst: " + caseFirst);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue