Class Passage
- java.lang.Object
-
- org.apache.lucene.search.matchhighlight.OffsetRange
-
- org.apache.lucene.search.matchhighlight.Passage
-
- All Implemented Interfaces:
Cloneable
public class Passage extends OffsetRange
A passage is a fragment of source text, scored and possibly with a list of sub-offsets (markers) to be highlighted. The markers can be overlapping or nested, but they're always contained within the passage.
-
-
Field Summary
Fields Modifier and Type Field Description List<OffsetRange>markers-
Fields inherited from class org.apache.lucene.search.matchhighlight.OffsetRange
from, to
-
-
Constructor Summary
Constructors Constructor Description Passage(int from, int to, List<OffsetRange> markers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OffsetRangeslice(int from, int to)Passages can't be sliced as it could split previously determined highlight markers.StringtoString()
-
-
-
Field Detail
-
markers
public List<OffsetRange> markers
-
-
Constructor Detail
-
Passage
public Passage(int from, int to, List<OffsetRange> markers)
-
-
Method Detail
-
slice
public OffsetRange slice(int from, int to)
Passages can't be sliced as it could split previously determined highlight markers.- Overrides:
slicein classOffsetRange
-
toString
public String toString()
- Overrides:
toStringin classOffsetRange
-
-