use of com.xiaomi.linden.thrift.common.LindenSchema in project linden by XiaoMi.
the class TestLindenUpdate method init.
@Override
public void init() throws Exception {
LindenSchema schema = new LindenSchema().setId("id");
schema.addToFields(new LindenFieldSchema().setName("title").setIndexed(true).setStored(true).setTokenized(true));
schema.addToFields(new LindenFieldSchema().setName("field1").setDocValues(true));
schema.addToFields(new LindenFieldSchema().setName("rank").setType(LindenType.FLOAT).setIndexed(true));
schema.addToFields(new LindenFieldSchema().setName("cat1").setType(LindenType.INTEGER).setStored(true));
schema.addToFields(new LindenFieldSchema().setName("cat2").setType(LindenType.DOUBLE).setDocValues(true));
schema.addToFields(new LindenFieldSchema().setName("tagstr").setType(LindenType.STRING).setIndexed(true).setDocValues(true));
schema.addToFields(new LindenFieldSchema().setName("tagnum").setType(LindenType.INTEGER).setIndexed(true).setStored(true).setMulti(true));
lindenConfig.setSchema(schema);
lindenConfig.setEnableSourceFieldCache(true);
}
Aggregations