Class SynonymTokenFilterFactory

    • Field Detail

      • ignoreCase

        @Deprecated
        protected final boolean ignoreCase
        Deprecated.
        this property only works with tokenizer property
      • format

        protected final java.lang.String format
      • expand

        protected final boolean expand
      • lenient

        protected final boolean lenient
      • settings

        protected final Settings settings
      • tokenizerFactory

        @Deprecated
        protected final TokenizerFactory tokenizerFactory
        Deprecated.
        This filter tokenize synonyms with whatever tokenizer and token filters appear before it in the chain in 6.0.
    • Constructor Detail

      • SynonymTokenFilterFactory

        public SynonymTokenFilterFactory​(IndexSettings indexSettings,
                                         Environment env,
                                         AnalysisRegistry analysisRegistry,
                                         java.lang.String name,
                                         Settings settings)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • create

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

        public TokenFilterFactory getChainAwareTokenFilterFactory​(TokenizerFactory tokenizer,
                                                                  java.util.List<CharFilterFactory> charFilters,
                                                                  java.util.List<TokenFilterFactory> previousTokenFilters,
                                                                  java.util.function.Function<java.lang.String,​TokenFilterFactory> allFilters)
        Description copied from interface: TokenFilterFactory
        Rewrite the TokenFilterFactory to take into account the preceding analysis chain, or refer to other TokenFilterFactories
        Parameters:
        tokenizer - the TokenizerFactory for the preceding chain
        charFilters - any CharFilterFactories for the preceding chain
        previousTokenFilters - a list of TokenFilterFactories in the preceding chain
        allFilters - access to previously defined TokenFilterFactories
      • buildSynonyms

        protected org.apache.lucene.analysis.synonym.SynonymMap buildSynonyms​(org.apache.lucene.analysis.Analyzer analyzer,
                                                                              java.io.Reader rules)
      • getRulesFromSettings

        protected java.io.Reader getRulesFromSettings​(Environment env)