Search in sources :

Example 1 with FieldSets

use of com.yahoo.searchdefinition.FieldSets in project vespa by vespa-engine.

the class DocumentTypeChangeValidatorTest method createDocumentTypeWithReferenceField.

private static NewDocumentType createDocumentTypeWithReferenceField(String nameReferencedDocumentType) {
    StructDataType headerfields = new StructDataType("headerfields");
    headerfields.addField(new Field("ref", new ReferenceDataType(new DocumentType(nameReferencedDocumentType), 0)));
    return new NewDocumentType(new NewDocumentType.Name("mydoc"), headerfields, new StructDataType("bodyfields"), new FieldSets(), Collections.emptySet());
}
Also used : Field(com.yahoo.document.Field) FieldSets(com.yahoo.searchdefinition.FieldSets) ReferenceDataType(com.yahoo.document.ReferenceDataType) StructDataType(com.yahoo.document.StructDataType) DocumentType(com.yahoo.document.DocumentType) NewDocumentType(com.yahoo.documentmodel.NewDocumentType) NewDocumentType(com.yahoo.documentmodel.NewDocumentType)

Aggregations

DocumentType (com.yahoo.document.DocumentType)1 Field (com.yahoo.document.Field)1 ReferenceDataType (com.yahoo.document.ReferenceDataType)1 StructDataType (com.yahoo.document.StructDataType)1 NewDocumentType (com.yahoo.documentmodel.NewDocumentType)1 FieldSets (com.yahoo.searchdefinition.FieldSets)1