public class DocNameExtractor extends Object
Constructor and Description |
---|
DocNameExtractor(String docNameField)
Constructor for DocNameExtractor.
|
Modifier and Type | Method and Description |
---|---|
String |
docName(IndexSearcher searcher,
int docid)
Extract the name of the input doc from the index.
|
public DocNameExtractor(String docNameField)
docNameField
- name of the stored field containing the doc name.public String docName(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.