|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectScoreDoc
FieldDoc
DocHit
public abstract class DocHit
Represents a query hit at the document level. May contain Snippet
s
if those were requested.
Field Summary |
---|
Fields inherited from class FieldDoc |
---|
fields |
Fields inherited from class ScoreDoc |
---|
doc, score |
Constructor Summary | |
---|---|
DocHit(int docNum,
float score)
Construct a document hit. |
Method Summary | |
---|---|
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 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.) |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
DocHit(int docNum, float score)
docNum
- Lucene ID for the document info chunkscore
- Score for this hitMethod Detail |
---|
public abstract String filePath()
public abstract int recordNum()
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |