use of org.molgenis.data.elasticsearch.generator.model.MappingType in project molgenis by molgenis.
the class MappingGenerator method createFieldMapping.
private FieldMapping createFieldMapping(Attribute attribute, int depth, int maxDepth) {
String fieldName = documentIdGenerator.generateId(attribute);
MappingType mappingType = toMappingType(attribute, depth, maxDepth);
List<FieldMapping> nestedFieldMappings = mappingType == MappingType.NESTED ? createFieldMappings(attribute.getRefEntity(), depth + 1, maxDepth) : null;
return FieldMapping.create(fieldName, mappingType, nestedFieldMappings);
}
Aggregations