Search in sources :

Example 36 with DataType

use of com.yahoo.document.DataType 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);
}
Also used : Field(com.yahoo.document.Field) WeightedSetDataType(com.yahoo.document.WeightedSetDataType) DocumentType(com.yahoo.document.DocumentType) DataType(com.yahoo.document.DataType) ArrayDataType(com.yahoo.document.ArrayDataType) StructDataType(com.yahoo.document.StructDataType) MapDataType(com.yahoo.document.MapDataType) PositionDataType(com.yahoo.document.PositionDataType) TensorDataType(com.yahoo.document.TensorDataType) WeightedSetDataType(com.yahoo.document.WeightedSetDataType) ReferenceDataType(com.yahoo.document.ReferenceDataType)

Example 37 with DataType

use of com.yahoo.document.DataType 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);
}
Also used : Field(com.yahoo.document.Field) DocumentType(com.yahoo.document.DocumentType) DataType(com.yahoo.document.DataType) ArrayDataType(com.yahoo.document.ArrayDataType) StructDataType(com.yahoo.document.StructDataType) MapDataType(com.yahoo.document.MapDataType) PositionDataType(com.yahoo.document.PositionDataType) TensorDataType(com.yahoo.document.TensorDataType) WeightedSetDataType(com.yahoo.document.WeightedSetDataType) ReferenceDataType(com.yahoo.document.ReferenceDataType) MapDataType(com.yahoo.document.MapDataType) ArrayDataType(com.yahoo.document.ArrayDataType)

Example 38 with DataType

use of com.yahoo.document.DataType 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);
}
Also used : Field(com.yahoo.document.Field) DocumentType(com.yahoo.document.DocumentType) DataType(com.yahoo.document.DataType) ArrayDataType(com.yahoo.document.ArrayDataType) StructDataType(com.yahoo.document.StructDataType) MapDataType(com.yahoo.document.MapDataType) PositionDataType(com.yahoo.document.PositionDataType) TensorDataType(com.yahoo.document.TensorDataType) WeightedSetDataType(com.yahoo.document.WeightedSetDataType) ReferenceDataType(com.yahoo.document.ReferenceDataType) ArrayDataType(com.yahoo.document.ArrayDataType)

Example 39 with DataType

use of com.yahoo.document.DataType in project vespa by vespa-engine.

the class JsonWriterTestCase method registerSinglePositionDocumentType.

private void registerSinglePositionDocumentType() {
    DocumentType x = new DocumentType("testsinglepos");
    DataType d = PositionDataType.INSTANCE;
    x.addField(new Field("singlepos", d));
    types.registerDocumentType(x);
}
Also used : Field(com.yahoo.document.Field) DocumentType(com.yahoo.document.DocumentType) DataType(com.yahoo.document.DataType) ArrayDataType(com.yahoo.document.ArrayDataType) StructDataType(com.yahoo.document.StructDataType) MapDataType(com.yahoo.document.MapDataType) PositionDataType(com.yahoo.document.PositionDataType) TensorDataType(com.yahoo.document.TensorDataType) WeightedSetDataType(com.yahoo.document.WeightedSetDataType) ReferenceDataType(com.yahoo.document.ReferenceDataType)

Example 40 with DataType

use of com.yahoo.document.DataType in project vespa by vespa-engine.

the class JsonWriterTestCase method registerRawDocumentType.

private void registerRawDocumentType() {
    DocumentType x = new DocumentType("testraw");
    DataType d = DataType.RAW;
    x.addField(new Field("actualraw", d));
    types.registerDocumentType(x);
}
Also used : Field(com.yahoo.document.Field) DocumentType(com.yahoo.document.DocumentType) DataType(com.yahoo.document.DataType) ArrayDataType(com.yahoo.document.ArrayDataType) StructDataType(com.yahoo.document.StructDataType) MapDataType(com.yahoo.document.MapDataType) PositionDataType(com.yahoo.document.PositionDataType) TensorDataType(com.yahoo.document.TensorDataType) WeightedSetDataType(com.yahoo.document.WeightedSetDataType) ReferenceDataType(com.yahoo.document.ReferenceDataType)

Aggregations

DataType (com.yahoo.document.DataType)62 ArrayDataType (com.yahoo.document.ArrayDataType)20 MapDataType (com.yahoo.document.MapDataType)19 Field (com.yahoo.document.Field)17 StructDataType (com.yahoo.document.StructDataType)17 WeightedSetDataType (com.yahoo.document.WeightedSetDataType)17 ReferenceDataType (com.yahoo.document.ReferenceDataType)13 PositionDataType (com.yahoo.document.PositionDataType)12 CollectionDataType (com.yahoo.document.CollectionDataType)11 FieldValue (com.yahoo.document.datatypes.FieldValue)11 TensorDataType (com.yahoo.document.TensorDataType)10 DocumentType (com.yahoo.document.DocumentType)9 StructuredDataType (com.yahoo.document.StructuredDataType)7 CollectionFieldValue (com.yahoo.document.datatypes.CollectionFieldValue)6 SDField (com.yahoo.searchdefinition.document.SDField)6 MapFieldValue (com.yahoo.document.datatypes.MapFieldValue)5 TemporaryStructuredDataType (com.yahoo.document.TemporaryStructuredDataType)4 AnnotationReferenceDataType (com.yahoo.document.annotation.AnnotationReferenceDataType)4 IntegerFieldValue (com.yahoo.document.datatypes.IntegerFieldValue)4 StringFieldValue (com.yahoo.document.datatypes.StringFieldValue)4