Class IcuCollationTokenFilterFactory

  • All Implemented Interfaces:
    TokenFilterFactory, IndexComponent

    public class IcuCollationTokenFilterFactory
    extends AbstractTokenFilterFactory
    An ICU based collation token filter. There are two ways to configure collation:

    The first is simply specifying the locale (defaults to the default locale). The language parameter is the lowercase two-letter ISO-639 code. An additional country and variant can be provided.

    The second option is to specify collation rules as defined in the Collation customization chapter in icu docs. The rules parameter can either embed the rules definition in the settings or refer to an external location (preferable located under the config location, relative to it).

    • Constructor Detail

      • IcuCollationTokenFilterFactory

        public IcuCollationTokenFilterFactory​(IndexSettings indexSettings,
                                              Environment environment,
                                              java.lang.String name,
                                              Settings settings)
    • Method Detail

      • create

        public org.apache.lucene.analysis.TokenStream create​(org.apache.lucene.analysis.TokenStream tokenStream)