HashMap<String,String> fields = new HashMap<String,String>();
for(IndexableField field : doc.getFields()) {
fields.put(field.name(), doc.get(field.name()));
}
response.addResult(new Result(
doc.get("otype"),
doc.get("odata"),
doc.get("oid"),
Long.parseLong(lastModified),
Boolean.parseBoolean(doc.get("active")),