String type = colf.substring(0, idx);
String id = colf.substring(idx + 1);
doc.setId(id);
for (Entry<String,Collection<FieldValue>> entry : eventFields.asMap().entrySet()) {
for (FieldValue fv : entry.getValue()) {
Field val = new Field();
val.setFieldName(entry.getKey());
val.setFieldValue(new String(fv.getValue(), Charset.forName("UTF-8")));
doc.getFields().add(val);
}
}
// Add the pointer for the content.
Field docPointer = new Field();
docPointer.setFieldName("DOCUMENT");
docPointer.setFieldValue("DOCUMENT:" + row + "/" + type + "/" + id);
doc.getFields().add(docPointer);
return doc;
}