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
    System.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>, Boolean)
    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, Boolean)
    AbstractAnalysisFactory.RequireInt32(IDictionary<String, String>, String)
    AbstractAnalysisFactory.GetInt32(IDictionary<String, String>, String, Int32)
    AbstractAnalysisFactory.RequireBoolean(IDictionary<String, String>, String)
    AbstractAnalysisFactory.GetBoolean(IDictionary<String, String>, String, Boolean)
    AbstractAnalysisFactory.RequireSingle(IDictionary<String, String>, String)
    AbstractAnalysisFactory.GetSingle(IDictionary<String, String>, String, Single)
    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, Boolean)
    AbstractAnalysisFactory.GetLines(IResourceLoader, String)
    AbstractAnalysisFactory.GetSnowballWordSet(IResourceLoader, String, Boolean)
    AbstractAnalysisFactory.SplitFileNames(String)
    AbstractAnalysisFactory.GetClassArg()
    AbstractAnalysisFactory.IsExplicitLuceneMatchVersion
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Analysis.Miscellaneous
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public class CapitalizationFilterFactory : TokenFilterFactory

    Constructors

    | Improve this Doc View Source

    CapitalizationFilterFactory(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 Source

    CULTURE

    Declaration
    public const string CULTURE = "culture"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    FORCE_FIRST_LETTER

    Declaration
    public const string FORCE_FIRST_LETTER = "forceFirstLetter"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    KEEP

    Declaration
    public const string KEEP = "keep"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    KEEP_IGNORE_CASE

    Declaration
    public const string KEEP_IGNORE_CASE = "keepIgnoreCase"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    MAX_TOKEN_LENGTH

    Declaration
    public const string MAX_TOKEN_LENGTH = "maxTokenLength"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    MAX_WORD_COUNT

    Declaration
    public const string MAX_WORD_COUNT = "maxWordCount"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    MIN_WORD_LENGTH

    Declaration
    public const string MIN_WORD_LENGTH = "minWordLength"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    OK_PREFIX

    Declaration
    public const string OK_PREFIX = "okPrefix"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    ONLY_FIRST_WORD

    Declaration
    public const string ONLY_FIRST_WORD = "onlyFirstWord"
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    Create(TokenStream)

    Declaration
    public override TokenStream Create(TokenStream input)
    Parameters
    Type Name Description
    Lucene.Net.Analysis.TokenStream input
    Returns
    Type Description
    Lucene.Net.Analysis.TokenStream
    Overrides
    TokenFilterFactory.Create(TokenStream)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 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.