IndexModule: Use lowercase IndexType values consistently
Before this change, the init would fail as reported in the merged Ia129d3eb's trailing comments. Change-Id: I55af38995166c2b9f4dbb9fbc6196df083411a89
This commit is contained in:
parent
0903cb9f30
commit
1393972509
@ -74,13 +74,13 @@ import org.eclipse.jgit.lib.Config;
|
||||
*/
|
||||
public class IndexModule extends LifecycleModule {
|
||||
public static class IndexType {
|
||||
private static final String LUCENE = "LUCENE";
|
||||
private static final String ELASTICSEARCH = "ELASTICSEARCH";
|
||||
private static final String LUCENE = "lucene";
|
||||
private static final String ELASTICSEARCH = "elasticsearch";
|
||||
|
||||
private final String type;
|
||||
|
||||
public IndexType(@Nullable String type) {
|
||||
this.type = type == null ? getDefault() : type;
|
||||
this.type = type == null ? getDefault() : type.toLowerCase();
|
||||
}
|
||||
|
||||
public static String getDefault() {
|
||||
@ -92,11 +92,11 @@ public class IndexModule extends LifecycleModule {
|
||||
}
|
||||
|
||||
public boolean isLucene() {
|
||||
return type.equalsIgnoreCase(LUCENE);
|
||||
return type.equals(LUCENE);
|
||||
}
|
||||
|
||||
public boolean isElasticsearch() {
|
||||
return type.equalsIgnoreCase(ELASTICSEARCH);
|
||||
return type.equals(ELASTICSEARCH);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,7 +32,7 @@ public final class ElasticTestUtils {
|
||||
}
|
||||
|
||||
public static void configure(Config config, int port, String prefix, ElasticVersion version) {
|
||||
config.setString("index", null, "type", "ELASTICSEARCH");
|
||||
config.setString("index", null, "type", "elasticsearch");
|
||||
config.setString("elasticsearch", null, "server", "http://localhost:" + port);
|
||||
config.setString("elasticsearch", null, "prefix", prefix);
|
||||
config.setInt("index", null, "maxLimit", 10000);
|
||||
|
Loading…
Reference in New Issue
Block a user