"The parsed Solr Document does not contain a value for the %s Field!",
fieldMapper.getDocumentIdField()));
}
Representation rep = getValueFactory().createRepresentation(id.toString());
for (String fieldName : doc.getFieldNames()) {
IndexField indexField = fieldMapper.getField(fieldName);
if (indexField != null && indexField.getPath().size() == 1) {
String lang = indexField.getLanguages().isEmpty() ? null : indexField.getLanguages()
.iterator().next();
if (fields == null || fields.contains(indexField.getPath().get(0))) {
for (Object value : doc.getFieldValues(fieldName)) {
if (value != null) {
IndexDataTypeEnum dataTypeEnumEntry = IndexDataTypeEnum.forIndexType(indexField
.getDataType());
if (dataTypeEnumEntry != null) {
Object javaValue = indexValueFactory.createValue(
dataTypeEnumEntry.getJavaType(), indexField.getDataType(), value, lang);
if (javaValue != null) {
rep.add(indexField.getPath().iterator().next(), javaValue);
} else {
log.warn(String.format("java value=null for index value %s", value));
}
} else {
log.warn(String.format(
"No DataType Configuration found for Index Data Type %s!",
indexField.getDataType()));
}
} // else index value == null -> ignore
} // end for all values
}
} else {