Class SynonymTokenFilterFactory

    • Field Detail

      • ignoreCase

        protected final boolean ignoreCase
        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

        protected final TokenizerFactory tokenizerFactory
        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)
    • 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
        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,
      • getRulesFromSettings

        protected getRulesFromSettings​(Environment env)