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));
}
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));
}
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));
}
Aggregations