public class DocNameExtractor extends Object
Constructor and Description |
---|
DocNameExtractor(String docNameField)
Constructor for DocNameExtractor.
|
public DocNameExtractor(String docNameField)
docNameField
- name of the stored field containing the doc name.public String docName(org.apache.lucene.search.IndexSearcher searcher, int docid) throws IOException
searcher
- access to the index.docid
- ID of doc whose name is needed.IOException
- if cannot extract the doc name from the index.