* Constructor for DocNameExtractor.
* @param docNameField name of the stored field containing the doc name.
*/
public DocNameExtractor (final String docNameField) {
this.docNameField = docNameField;
fldSel = new FieldSelector() {
public FieldSelectorResult accept(String fieldName) {
return fieldName.equals(docNameField) ?
FieldSelectorResult.LOAD_AND_BREAK :
FieldSelectorResult.NO_LOAD;
}