Skip to content

Commit

Permalink
Tests: index.version.created must be set
Browse files Browse the repository at this point in the history
Due to this [change](elastic/elasticsearch#8018), we need to fix our tests for elasticsearch 1.4.0 and above.

Closes #47.

(cherry picked from commit 3a90982)
  • Loading branch information
dadoonet committed Oct 15, 2014
1 parent a515501 commit d268eac
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -24,6 +24,8 @@
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;
Expand Down Expand Up @@ -170,7 +172,10 @@ public void testIterationMarkCharFilter() throws IOException {
}

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");

Expand Down

0 comments on commit d268eac

Please sign in to comment.