use of com.yahoo.document.Field in project vespa by vespa-engine.
the class JsonWriterTestCase method registerSetDocumentType.
private void registerSetDocumentType() {
DocumentType x = new DocumentType("testset");
DataType d = new WeightedSetDataType(DataType.STRING, true, true);
x.addField(new Field("actualset", d));
types.registerDocumentType(x);
}
use of com.yahoo.document.Field in project vespa by vespa-engine.
the class JsonWriterTestCase method registerReferenceDocumentType.
private void registerReferenceDocumentType() {
DocumentType docTypeWithRef = new DocumentType("testrefs");
ReferenceDataType type = ReferenceDataType.createWithInferredId(types.getDocumentType("smoke"));
docTypeWithRef.addField(new Field("ref_field", type));
types.registerDocumentType(docTypeWithRef);
}
use of com.yahoo.document.Field in project vespa by vespa-engine.
the class JsonWriterTestCase method registerMirrorsDocumentType.
private void registerMirrorsDocumentType() {
DocumentType x = new DocumentType("mirrors");
StructDataType woo = new StructDataType("woo");
woo.addField(new Field("sandra", DataType.STRING));
woo.addField(new Field("cloud", DataType.STRING));
x.addField(new Field("skuggsjaa", woo));
types.registerDocumentType(x);
}
use of com.yahoo.document.Field in project vespa by vespa-engine.
the class JsonWriterTestCase method registerMapToStringToArrayDocumentType.
private void registerMapToStringToArrayDocumentType() {
DocumentType x = new DocumentType("testMapStringToArrayOfInt");
DataType value = new ArrayDataType(DataType.INT);
DataType d = new MapDataType(DataType.STRING, value);
x.addField(new Field("actualMapStringToArrayOfInt", d));
types.registerDocumentType(x);
}
use of com.yahoo.document.Field in project vespa by vespa-engine.
the class JsonWriterTestCase method registerMultiPositionDocumentType.
private void registerMultiPositionDocumentType() {
DocumentType x = new DocumentType("testmultipos");
DataType d = new ArrayDataType(PositionDataType.INSTANCE);
x.addField(new Field("multipos", d));
types.registerDocumentType(x);
}
Aggregations