Class FieldFragList
- java.lang.Object
-
- org.apache.lucene.search.vectorhighlight.FieldFragList
-
- Direct Known Subclasses:
SimpleFieldFragList
,WeightedFieldFragList
public abstract class FieldFragList extends java.lang.Object
FieldFragList has a list of "frag info" that is used by FragmentsBuilder class to create fragments (snippets).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FieldFragList.WeightedFragInfo
List of term offsets + weight for a frag info
-
Constructor Summary
Constructors Constructor Description FieldFragList(int fragCharSize)
a constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
add(int startOffset, int endOffset, java.util.List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)
convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfosjava.util.List<FieldFragList.WeightedFragInfo>
getFragInfos()
return the list of WeightedFragInfos.
-
-
-
Method Detail
-
add
public abstract void add(int startOffset, int endOffset, java.util.List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)
convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfos- Parameters:
startOffset
- start offset of the fragmentendOffset
- end offset of the fragmentphraseInfoList
- list of WeightedPhraseInfo objects
-
getFragInfos
public java.util.List<FieldFragList.WeightedFragInfo> getFragInfos()
return the list of WeightedFragInfos.- Returns:
- fragInfos.
-
-