Class LimitTokenCountFilterFactory
Factory for LimitTokenCountFilter.
<fieldType name="text_lngthcnt" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10" consumeAllTokens="false" />
</analyzer>
</fieldType>
The consumeAllTokens property is optional and defaults to false
.
See LimitTokenCountFilter for an explanation of it's use.
Inherited Members
Namespace: Lucene.Net.Analysis.Miscellaneous
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class LimitTokenCountFilterFactory : TokenFilterFactory
Constructors
LimitTokenCountFilterFactory(IDictionary<string, string>)
Creates a new LimitTokenCountFilterFactory
Declaration
public LimitTokenCountFilterFactory(IDictionary<string, string> args)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, string> | args |
Fields
CONSUME_ALL_TOKENS_KEY
Factory for LimitTokenCountFilter.
<fieldType name="text_lngthcnt" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10" consumeAllTokens="false" />
</analyzer>
</fieldType>
The consumeAllTokens property is optional and defaults to false
.
See LimitTokenCountFilter for an explanation of it's use.
Declaration
public const string CONSUME_ALL_TOKENS_KEY = "consumeAllTokens"
Field Value
Type | Description |
---|---|
string |
MAX_TOKEN_COUNT_KEY
Factory for LimitTokenCountFilter.
<fieldType name="text_lngthcnt" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10" consumeAllTokens="false" />
</analyzer>
</fieldType>
The consumeAllTokens property is optional and defaults to false
.
See LimitTokenCountFilter for an explanation of it's use.
Declaration
public const string MAX_TOKEN_COUNT_KEY = "maxTokenCount"
Field Value
Type | Description |
---|---|
string |
Methods
Create(TokenStream)
Transform the specified input Lucene.Net.Analysis.TokenStream
Declaration
public override TokenStream Create(TokenStream input)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input |
Returns
Type | Description |
---|---|
TokenStream |