mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-28 02:48:38 +00:00
Tests: index.version.created must be set
Due to this [change](https://github.com/elasticsearch/elasticsearch/pull/8018), we need to fix our tests for elasticsearch 1.4.0 and above. Closes #47. (cherry picked from commit 3a90982)
This commit is contained in:
parent
cc60d9aa3c
commit
ff686ac06a
@ -24,6 +24,8 @@ import org.apache.lucene.analysis.Tokenizer;
|
||||
import org.apache.lucene.analysis.ja.JapaneseAnalyzer;
|
||||
import org.apache.lucene.analysis.ja.JapaneseTokenizer;
|
||||
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
||||
import org.elasticsearch.common.inject.Injector;
|
||||
import org.elasticsearch.common.inject.ModulesBuilder;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
@ -170,7 +172,10 @@ public class KuromojiAnalysisTests extends ElasticsearchTestCase {
|
||||
}
|
||||
|
||||
public AnalysisService createAnalysisService() {
|
||||
Settings settings = ImmutableSettings.settingsBuilder().loadFromClasspath("org/elasticsearch/index/analysis/kuromoji_analysis.json").build();
|
||||
Settings settings = ImmutableSettings.settingsBuilder()
|
||||
.loadFromClasspath("org/elasticsearch/index/analysis/kuromoji_analysis.json")
|
||||
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)
|
||||
.build();
|
||||
|
||||
Index index = new Index("test");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user