Class BaseFragListBuilder
A abstract implementation of IFragListBuilder.
Implements
Inherited Members
Namespace: Lucene.Net.Search.VectorHighlight
Assembly: Lucene.Net.Highlighter.dll
Syntax
public abstract class BaseFragListBuilder : IFragListBuilder
Constructors
BaseFragListBuilder()
A abstract implementation of IFragListBuilder.
Declaration
protected BaseFragListBuilder()
BaseFragListBuilder(int)
A abstract implementation of IFragListBuilder.
Declaration
protected BaseFragListBuilder(int margin)
Parameters
Type | Name | Description |
---|---|---|
int | margin |
Fields
MARGIN_DEFAULT
A abstract implementation of IFragListBuilder.
Declaration
public static readonly int MARGIN_DEFAULT
Field Value
Type | Description |
---|---|
int |
MIN_FRAG_CHAR_SIZE_FACTOR
A abstract implementation of IFragListBuilder.
Declaration
public static readonly int MIN_FRAG_CHAR_SIZE_FACTOR
Field Value
Type | Description |
---|---|
int |
Methods
AcceptPhrase(WeightedPhraseInfo, int, int)
A predicate to decide if the given FieldPhraseList.WeightedPhraseInfo should be accepted as a highlighted phrase or if it should be discarded.
The default implementation discards phrases that are composed of more than one term and where the matchLength exceeds the fragment character size.Declaration
protected virtual bool AcceptPhrase(FieldPhraseList.WeightedPhraseInfo info, int matchLength, int fragCharSize)
Parameters
Type | Name | Description |
---|---|---|
FieldPhraseList.WeightedPhraseInfo | info | the phrase info to accept |
int | matchLength | the match length of the current phrase |
int | fragCharSize | the configured fragment character size |
Returns
Type | Description |
---|---|
bool |
|
CreateFieldFragList(FieldPhraseList, FieldFragList, int)
A abstract implementation of IFragListBuilder.
Declaration
protected virtual FieldFragList CreateFieldFragList(FieldPhraseList fieldPhraseList, FieldFragList fieldFragList, int fragCharSize)
Parameters
Type | Name | Description |
---|---|---|
FieldPhraseList | fieldPhraseList | |
FieldFragList | fieldFragList | |
int | fragCharSize |
Returns
Type | Description |
---|---|
FieldFragList |
CreateFieldFragList(FieldPhraseList, int)
create a FieldFragList.
Declaration
public abstract FieldFragList CreateFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
Parameters
Type | Name | Description |
---|---|---|
FieldPhraseList | fieldPhraseList | FieldPhraseList object |
int | fragCharSize | the length (number of chars) of a fragment |
Returns
Type | Description |
---|---|
FieldFragList | the created FieldFragList object |