Class DocNameExtractor

  • public class DocNameExtractor
    extends Object
    Utility: extract doc names from an index
    • Constructor Detail

      • DocNameExtractor

        public DocNameExtractor​(String docNameField)
        Constructor for DocNameExtractor.
        docNameField - name of the stored field containing the doc name.
    • Method Detail

      • docName

        public String docName​(StoredFields storedFields,
                              int docid)
                       throws IOException
        Extract the name of the input doc from the index.
        storedFields - access to the index.
        docid - ID of doc whose name is needed.
        the name of the input doc as extracted from the index.
        IOException - if cannot extract the doc name from the index.