public abstract class DocHit
extends FieldDoc
Snippet
s
if those were requested.Constructor and Description |
---|
DocHit(int docNum,
float score)
Construct a document hit.
|
Modifier and Type | Method and Description |
---|---|
Explanation |
explanation()
Get an explanation of this document's score.
|
abstract String |
filePath()
Retrieve the original file path as recorded in the index (if any.)
|
abstract AttribList |
metaData()
Retrieve a list of all meta-data name/value pairs associated with this
document.
|
abstract int |
nSnippets()
Return the number of snippets available (limited by the max # specified
in the original query.)
|
abstract int |
recordNum()
Retrieve this document's record number within the main file, or zero
if this is the only record.
|
abstract Snippet |
snippet(int hitNum,
boolean getText)
Retrieve the specified snippet.
|
abstract String |
subDocument()
Retrieve this document's subdocument name, or null if there is
no subdocument (the default).
|
abstract int |
totalSnippets()
Return the total number of snippets found for this document (not the
number actually returned, which is limited by the max # of snippets
specified in the query.)
|
DocHit(int docNum, float score)
docNum
- Lucene ID for the document info chunkscore
- Score for this hitpublic abstract String filePath()
public abstract int recordNum()
public abstract String subDocument()
public abstract AttribList metaData()
public abstract int totalSnippets()
public abstract int nSnippets()
public abstract Snippet snippet(int hitNum, boolean getText)
hitNum
- 0..nSnippets()getText
- true to fetch the snippet text in context, false to
optionally skip that work and only fetch the rank,
score, etc.public Explanation explanation()