Show / Hide Table of Contents

    Class ICUCollationKeyFilter

    Converts each token into its , and then encodes the with IndexableBinaryStringTools, to allow it to be stored as an index term.

    Inheritance
    System.Object
    AttributeSource
    TokenStream
    TokenFilter
    ICUCollationKeyFilter
    Implements
    IDisposable
    Inherited Members
    TokenFilter.m_input
    TokenFilter.End()
    TokenFilter.Dispose(Boolean)
    TokenFilter.Reset()
    TokenStream.Dispose()
    AttributeSource.GetAttributeFactory()
    AttributeSource.GetAttributeClassesEnumerator()
    AttributeSource.GetAttributeImplsEnumerator()
    AttributeSource.AddAttributeImpl(Attribute)
    AttributeSource.AddAttribute<T>()
    AttributeSource.HasAttributes
    AttributeSource.HasAttribute<T>()
    AttributeSource.GetAttribute<T>()
    AttributeSource.ClearAttributes()
    AttributeSource.CaptureState()
    AttributeSource.RestoreState(AttributeSource.State)
    AttributeSource.GetHashCode()
    AttributeSource.Equals(Object)
    AttributeSource.ReflectAsString(Boolean)
    AttributeSource.ReflectWith(IAttributeReflector)
    AttributeSource.CloneAttributes()
    AttributeSource.CopyTo(AttributeSource)
    AttributeSource.ToString()
    Namespace: Lucene.Net.Collation
    Assembly: Lucene.Net.ICU.dll
    Syntax
    public sealed class ICUCollationKeyFilter : TokenFilter, IDisposable
    Remarks

    WARNING: Make sure you use exactly the same at index and query time -- CollationKeys are only comparable when produced by the same . s are independently versioned, so it is safe to search against stored s if the following are exactly the same (best practice is to store this information with the index and check that they remain the same at query time):

    1. Collator version - see Version
    2. The collation strength used - see

    s generated by ICU Collators are not compatible with those generated by java.text.Collators. Specifically, if you use ICUCollationKeyAnalyzer to generate index terms, do not use CollationKeyAnalyzer on the query side, or vice versa.

    ICUCollationKeyAnalyzer is significantly faster and generates significantly shorter keys than CollationKeyAnalyzer. See http://site.icu-project.org/charts/collation-icu4j-sun for key generation timing and key length comparisons between ICU4J and java.text.Collator over several languages.

    Constructors

    | Improve this Doc View Source

    ICUCollationKeyFilter(TokenStream, Collator)

    Creates a new ICUCollationKeyFilter.

    Declaration
    public ICUCollationKeyFilter(TokenStream input, Collator collator)
    Parameters
    Type Name Description
    TokenStream input

    Source token stream.

    Collator collator

    generator.

    Methods

    | Improve this Doc View Source

    IncrementToken()

    Declaration
    public override bool IncrementToken()
    Returns
    Type Description
    System.Boolean
    Overrides
    TokenStream.IncrementToken()

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)