Move to Elasticsearch 0.21.0.Beta1
Due to refactoring in 0.21.x we have to update this plugin Closes #2.
This commit is contained in:
parent
fc040db280
commit
52ca251276
7
pom.xml
7
pom.xml
|
@ -31,7 +31,8 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<elasticsearch.version>0.19.3</elasticsearch.version>
|
<elasticsearch.version>0.21.0.Beta1-SNAPSHOT</elasticsearch.version>
|
||||||
|
<lucene.version>4.1.0</lucene.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -51,8 +52,8 @@
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.lucene</groupId>
|
<groupId>org.apache.lucene</groupId>
|
||||||
<artifactId>lucene-kuromoji</artifactId>
|
<artifactId>lucene-analyzers-kuromoji</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>${lucene.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
package org.elasticsearch.index.analysis;
|
package org.elasticsearch.index.analysis;
|
||||||
|
|
||||||
import org.apache.lucene.analysis.CharArraySet;
|
|
||||||
import org.apache.lucene.analysis.ja.JapaneseAnalyzer;
|
import org.apache.lucene.analysis.ja.JapaneseAnalyzer;
|
||||||
import org.apache.lucene.analysis.ja.JapaneseTokenizer;
|
import org.apache.lucene.analysis.ja.JapaneseTokenizer;
|
||||||
import org.apache.lucene.analysis.ja.dict.UserDictionary;
|
import org.apache.lucene.analysis.ja.dict.UserDictionary;
|
||||||
|
import org.apache.lucene.analysis.util.CharArraySet;
|
||||||
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;
|
||||||
|
|
|
@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.instanceOf;
|
||||||
public class KuromojiAnalysisTests {
|
public class KuromojiAnalysisTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDefaultsKuromojiAnalysis() {
|
public void testDefaultsKuromojiAnalysis() throws IOException {
|
||||||
AnalysisService analysisService = createAnalysisService();
|
AnalysisService analysisService = createAnalysisService();
|
||||||
|
|
||||||
TokenizerFactory tokenizerFactory = analysisService.tokenizer("kuromoji_tokenizer");
|
TokenizerFactory tokenizerFactory = analysisService.tokenizer("kuromoji_tokenizer");
|
||||||
|
@ -74,7 +74,7 @@ public class KuromojiAnalysisTests {
|
||||||
|
|
||||||
analyzer = analysisService.analyzer("my_analyzer");
|
analyzer = analysisService.analyzer("my_analyzer");
|
||||||
assertThat(analyzer.analyzer(), instanceOf(CustomAnalyzer.class));
|
assertThat(analyzer.analyzer(), instanceOf(CustomAnalyzer.class));
|
||||||
assertThat(analyzer.analyzer().tokenStream(null, null), instanceOf(JapaneseTokenizer.class));
|
assertThat(analyzer.analyzer().tokenStream(null, new StringReader("")), instanceOf(JapaneseTokenizer.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue