Class FieldFragList
java.lang.Object
org.apache.lucene.search.vectorhighlight.FieldFragList
- Direct Known Subclasses:
SimpleFieldFragList
,WeightedFieldFragList
FieldFragList has a list of "frag info" that is used by FragmentsBuilder class to create
fragments (snippets).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
List of term offsets + weight for a frag info -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
add
(int startOffset, int endOffset, List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList) convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfosreturn the list of WeightedFragInfos.
-
Constructor Details
-
FieldFragList
public FieldFragList(int fragCharSize) a constructor.- Parameters:
fragCharSize
- the length (number of chars) of a fragment
-
-
Method Details
-
add
public abstract void add(int startOffset, int endOffset, 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
return the list of WeightedFragInfos.- Returns:
- fragInfos.
-