Document doc = reader.document(hit.getIndexDocNo(), (fieldNames==null) ? null : new MapFieldSelector(fieldNames));
Enumeration e = doc.fields();
while (e.hasMoreElements()) {
Field field = (Field)e.nextElement();
fields.add(field.name());
values.add(field.stringValue());
}
return new HitDetails((String[])fields.toArray(new String[fields.size()]),
(String[])values.toArray(new String[values.size()]));
}