Class CapitalizationFilterFactory
Factory for CapitalizationFilter.
The factory takes parameters:
"onlyFirstWord" - should each word be capitalized or all of the words?
"keep" - a keep word list. Each word that should be kept separated by whitespace.
"keepIgnoreCase - true or false. If true, the keep list will be considered case-insensitive.
"forceFirstLetter" - Force the first letter to be capitalized even if it is in the keep list
"okPrefix" - do not change word capitalization if a word begins with something in this list. for example if "McK" is on the okPrefix list, the word "McKinley" should not be changed to "Mckinley"
"minWordLength" - how long the word needs to be to get capitalization applied. If the minWordLength is 3, "and" > "And" but "or" stays "or"
"maxWordCount" - if the token contains more then maxWordCount words, the capitalization is assumed to be correct.
<fieldType name="text_cptlztn" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.CapitalizationFilterFactory" onlyFirstWord="true"
keep="java solr lucene" keepIgnoreCase="false"
okPrefix="McK McD McA"/>
</analyzer>
</fieldType>
@since solr 1.3
Inherited Members
Namespace: Lucene.Net.Analysis.Miscellaneous
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class CapitalizationFilterFactory : TokenFilterFactory
Constructors
| Improve this Doc View SourceCapitalizationFilterFactory(IDictionary<String, String>)
Creates a new CapitalizationFilterFactory
Declaration
public CapitalizationFilterFactory(IDictionary<string, string> args)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | args |
Fields
| Improve this Doc View SourceCULTURE
Declaration
public const string CULTURE = "culture"
Field Value
Type | Description |
---|---|
System.String |
FORCE_FIRST_LETTER
Declaration
public const string FORCE_FIRST_LETTER = "forceFirstLetter"
Field Value
Type | Description |
---|---|
System.String |
KEEP
Declaration
public const string KEEP = "keep"
Field Value
Type | Description |
---|---|
System.String |
KEEP_IGNORE_CASE
Declaration
public const string KEEP_IGNORE_CASE = "keepIgnoreCase"
Field Value
Type | Description |
---|---|
System.String |
MAX_TOKEN_LENGTH
Declaration
public const string MAX_TOKEN_LENGTH = "maxTokenLength"
Field Value
Type | Description |
---|---|
System.String |
MAX_WORD_COUNT
Declaration
public const string MAX_WORD_COUNT = "maxWordCount"
Field Value
Type | Description |
---|---|
System.String |
MIN_WORD_LENGTH
Declaration
public const string MIN_WORD_LENGTH = "minWordLength"
Field Value
Type | Description |
---|---|
System.String |
OK_PREFIX
Declaration
public const string OK_PREFIX = "okPrefix"
Field Value
Type | Description |
---|---|
System.String |
ONLY_FIRST_WORD
Declaration
public const string ONLY_FIRST_WORD = "onlyFirstWord"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceCreate(TokenStream)
Declaration
public override TokenStream Create(TokenStream input)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input |
Returns
Type | Description |
---|---|
TokenStream |