Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Inheritance
    object
    AbstractAnalysisFactory
    TokenFilterFactory
    CapitalizationFilterFactory
    Inherited Members
    TokenFilterFactory.ForName(string, IDictionary<string, string>)
    TokenFilterFactory.LookupClass(string)
    TokenFilterFactory.AvailableTokenFilters
    TokenFilterFactory.ReloadTokenFilters()
    AbstractAnalysisFactory.LUCENE_MATCH_VERSION_PARAM
    AbstractAnalysisFactory.m_luceneMatchVersion
    AbstractAnalysisFactory.OriginalArgs
    AbstractAnalysisFactory.AssureMatchVersion()
    AbstractAnalysisFactory.LuceneMatchVersion
    AbstractAnalysisFactory.Require(IDictionary<string, string>, string)
    AbstractAnalysisFactory.Require(IDictionary<string, string>, string, ICollection<string>)
    AbstractAnalysisFactory.Require(IDictionary<string, string>, string, ICollection<string>, bool)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, string)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, ICollection<string>)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, ICollection<string>, string)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, ICollection<string>, string, bool)
    AbstractAnalysisFactory.RequireInt32(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetInt32(IDictionary<string, string>, string, int)
    AbstractAnalysisFactory.RequireBoolean(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetBoolean(IDictionary<string, string>, string, bool)
    AbstractAnalysisFactory.RequireSingle(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetSingle(IDictionary<string, string>, string, float)
    AbstractAnalysisFactory.RequireChar(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetChar(IDictionary<string, string>, string, char)
    AbstractAnalysisFactory.GetSet(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetPattern(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetCulture(IDictionary<string, string>, string, CultureInfo)
    AbstractAnalysisFactory.GetWordSet(IResourceLoader, string, bool)
    AbstractAnalysisFactory.GetLines(IResourceLoader, string)
    AbstractAnalysisFactory.GetSnowballWordSet(IResourceLoader, string, bool)
    AbstractAnalysisFactory.SplitFileNames(string)
    AbstractAnalysisFactory.GetClassArg()
    AbstractAnalysisFactory.IsExplicitLuceneMatchVersion
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Analysis.Miscellaneous
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public class CapitalizationFilterFactory : TokenFilterFactory

    Constructors

    CapitalizationFilterFactory(IDictionary<string, string>)

    Creates a new CapitalizationFilterFactory

    Declaration
    public CapitalizationFilterFactory(IDictionary<string, string> args)
    Parameters
    Type Name Description
    IDictionary<string, string> args

    Fields

    CULTURE

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string CULTURE = "culture"
    Field Value
    Type Description
    string

    FORCE_FIRST_LETTER

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string FORCE_FIRST_LETTER = "forceFirstLetter"
    Field Value
    Type Description
    string

    KEEP

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string KEEP = "keep"
    Field Value
    Type Description
    string

    KEEP_IGNORE_CASE

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string KEEP_IGNORE_CASE = "keepIgnoreCase"
    Field Value
    Type Description
    string

    MAX_TOKEN_LENGTH

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string MAX_TOKEN_LENGTH = "maxTokenLength"
    Field Value
    Type Description
    string

    MAX_WORD_COUNT

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string MAX_WORD_COUNT = "maxWordCount"
    Field Value
    Type Description
    string

    MIN_WORD_LENGTH

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string MIN_WORD_LENGTH = "minWordLength"
    Field Value
    Type Description
    string

    OK_PREFIX

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string OK_PREFIX = "okPrefix"
    Field Value
    Type Description
    string

    ONLY_FIRST_WORD

    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.

    "culture" - the culture to use to apply the capitalization rules. If not supplied or the string "invariant" is supplied, the invariant culture is used.

    <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

    Declaration
    public const string ONLY_FIRST_WORD = "onlyFirstWord"
    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
    Overrides
    TokenFilterFactory.Create(TokenStream)
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.