public class DocNameExtractor
extends java.lang.Object
Constructor and Description |
---|
DocNameExtractor(java.lang.String docNameField)
Constructor for DocNameExtractor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
docName(IndexSearcher searcher,
int docid)
Extract the name of the input doc from the index.
|
public DocNameExtractor(java.lang.String docNameField)
docNameField
- name of the stored field containing the doc name.public java.lang.String docName(IndexSearcher searcher, int docid) throws java.io.IOException
searcher
- access to the index.docid
- ID of doc whose name is needed.java.io.IOException
- if cannot extract the doc name from the index.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.