Search in sources :

Example 1 with ImportedFields

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

the class ImportedFieldsResolver method process.

@Override
public void process(boolean validate) {
    search.temporaryImportedFields().get().fields().forEach((name, field) -> resolveImportedField(field, validate));
    search.setImportedFields(new ImportedFields(importedFields));
}
Also used : ImportedFields(com.yahoo.searchdefinition.document.ImportedFields)

Example 2 with ImportedFields

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

the class ValidateFieldTypesTest method createSingleImportedField.

private static ImportedFields createSingleImportedField(String fieldName, DataType dataType) {
    Search targetSearch = new Search("target_doc", MockApplicationPackage.createEmpty());
    SDField targetField = new SDField("target_field", dataType);
    DocumentReference documentReference = new DocumentReference(new Field("reference_field"), targetSearch);
    ImportedField importedField = new ImportedField(fieldName, documentReference, targetField);
    return new ImportedFields(Collections.singletonMap(fieldName, importedField));
}
Also used : SummaryField(com.yahoo.vespa.documentmodel.SummaryField) SDField(com.yahoo.searchdefinition.document.SDField) Field(com.yahoo.document.Field) ImportedField(com.yahoo.searchdefinition.document.ImportedField) SDField(com.yahoo.searchdefinition.document.SDField) Search(com.yahoo.searchdefinition.Search) ImportedField(com.yahoo.searchdefinition.document.ImportedField) ImportedFields(com.yahoo.searchdefinition.document.ImportedFields) DocumentReference(com.yahoo.searchdefinition.DocumentReference)

Example 3 with ImportedFields

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

the class AddAttributeTransformToSummaryOfImportedFieldsTest method createSingleImportedField.

private static ImportedFields createSingleImportedField(String fieldName) {
    Search targetSearch = new Search("target_doc", MockApplicationPackage.createEmpty());
    SDField targetField = new SDField("target_field", DataType.INT);
    DocumentReference documentReference = new DocumentReference(new Field("reference_field"), targetSearch);
    ImportedField importedField = new ImportedField(fieldName, documentReference, targetField);
    return new ImportedFields(Collections.singletonMap(fieldName, importedField));
}
Also used : SummaryField(com.yahoo.vespa.documentmodel.SummaryField) SDField(com.yahoo.searchdefinition.document.SDField) Field(com.yahoo.document.Field) ImportedField(com.yahoo.searchdefinition.document.ImportedField) SDField(com.yahoo.searchdefinition.document.SDField) Search(com.yahoo.searchdefinition.Search) ImportedField(com.yahoo.searchdefinition.document.ImportedField) ImportedFields(com.yahoo.searchdefinition.document.ImportedFields) DocumentReference(com.yahoo.searchdefinition.DocumentReference)

Aggregations

ImportedFields (com.yahoo.searchdefinition.document.ImportedFields)3 Field (com.yahoo.document.Field)2 DocumentReference (com.yahoo.searchdefinition.DocumentReference)2 Search (com.yahoo.searchdefinition.Search)2 ImportedField (com.yahoo.searchdefinition.document.ImportedField)2 SDField (com.yahoo.searchdefinition.document.SDField)2 SummaryField (com.yahoo.vespa.documentmodel.SummaryField)2