|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.search.postingshighlight.Passage
public final class Passage
Represents a passage (typically a sentence of the document).
A passage contains getNumMatches() highlights from the query,
and the offsets and query terms that correspond with each match.
| Constructor Summary | |
|---|---|
Passage()
|
|
| Method Summary | |
|---|---|
int |
getEndOffset()
End offset of this passage. |
int[] |
getMatchEnds()
End offsets of the term matches, corresponding with getMatchStarts(). |
int[] |
getMatchStarts()
Start offsets of the term matches, in increasing order. |
Term[] |
getMatchTerms()
Term of the matches, corresponding with getMatchStarts(). |
int |
getNumMatches()
Number of term matches available in getMatchStarts(), getMatchEnds(),
getMatchTerms() |
float |
getScore()
Passage's score. |
int |
getStartOffset()
Start offset of this passage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Passage()
| Method Detail |
|---|
public int getStartOffset()
public int getEndOffset()
getStartOffset()public float getScore()
public int getNumMatches()
getMatchStarts(), getMatchEnds(),
getMatchTerms()
public int[] getMatchStarts()
Only getNumMatches() are valid. Note that these
offsets are absolute (not relative to getStartOffset()).
public int[] getMatchEnds()
getMatchStarts().
Only getNumMatches() are valid. Note that its possible that an end offset
could exceed beyond the bounds of the passage (getEndOffset()), if the
Analyzer produced a term which spans a passage boundary.
public Term[] getMatchTerms()
getMatchStarts().
Only getNumMatches() are valid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||