use of com.xiaomi.linden.core.LindenConfig in project linden by XiaoMi.
the class LindenConfigBuilder method build.
public static LindenConfig build() throws IOException {
File lindenProperties = new File("lindenProperties");
Preconditions.checkArgument(lindenProperties.exists(), "can not find linden properties file.");
try {
LindenConfig lindenConf = com.xiaomi.linden.core.LindenConfigBuilder.build(lindenProperties);
File lindenSchema = new File("lindenSchema");
Preconditions.checkArgument(lindenSchema.exists(), "can not find linden schema file.");
LindenSchema schema;
try {
schema = LindenSchemaBuilder.build(lindenSchema);
} catch (Exception e) {
logger.error("Linden schema builder exception", e);
throw new IOException(e);
}
lindenConf.setSchema(schema);
lindenConf.setIndexType(LindenConfig.IndexType.RAM);
return lindenConf;
} catch (Exception e) {
logger.error("Linden search config builder exception", e);
throw new IOException(e);
}
}
Aggregations