}, new HitExtractor() {
public Object mapHit(int id, Document document, float score) {
List fields = new ArrayList();
for(Enumeration e = document.fields(); e.hasMoreElements();) {
Field field = (Field)e.nextElement();
DocumentField documentField = new DocumentField(field.name(), field.stringValue(),
field.isIndexed(), field.isStored());
fields.add(documentField);
}
return fields;
}