return new QueryParams(fieldName, textToSearch);
}
}, new HitExtractor() {
public Object mapHit(int id, Document document, float score) {
if( document.get("request")!=null ) {
return new SearchResult(document.get("id"), document.get("request"),
score,document.get("category"));
} else {
return new SearchResult(document.get("id"), document.get("filename"),
score, document.get("category"));
}
}
});
}