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:
David Pilato 2013-02-24 21:46:34 +01:00
parent fc040db280
commit 52ca251276
3 changed files with 9 additions and 8 deletions

View File

@ -31,7 +31,8 @@
</parent>
<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>
<repositories>
@ -51,8 +52,8 @@
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-kuromoji</artifactId>
<version>3.6.1</version>
<artifactId>lucene-analyzers-kuromoji</artifactId>
<version>${lucene.version}</version>
<scope>compile</scope>
</dependency>
@ -174,4 +175,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

View File

@ -19,10 +19,10 @@
package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.CharArraySet;
import org.apache.lucene.analysis.ja.JapaneseAnalyzer;
import org.apache.lucene.analysis.ja.JapaneseTokenizer;
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.assistedinject.Assisted;
import org.elasticsearch.common.settings.Settings;

View File

@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.instanceOf;
public class KuromojiAnalysisTests {
@Test
public void testDefaultsKuromojiAnalysis() {
public void testDefaultsKuromojiAnalysis() throws IOException {
AnalysisService analysisService = createAnalysisService();
TokenizerFactory tokenizerFactory = analysisService.tokenizer("kuromoji_tokenizer");
@ -74,7 +74,7 @@ public class KuromojiAnalysisTests {
analyzer = analysisService.analyzer("my_analyzer");
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
@ -165,4 +165,4 @@ public class KuromojiAnalysisTests {
}
Assert.assertEquals(i, expected.length, "not all tokens produced");
}
}
}