Class CommonGramsTokenFilterDescriptor

  • All Implemented Interfaces:
    TokenFilterDescriptor

    public final class CommonGramsTokenFilterDescriptor
    extends Object
    implements TokenFilterDescriptor
    Token filter that generates bigrams for frequently occurring terms. Single terms are still indexed. It can be used as an alternative to the Stop Token Filter when we don’t want to completely ignore common terms
    Since:
    7.0
    • Constructor Detail

      • CommonGramsTokenFilterDescriptor

        public CommonGramsTokenFilterDescriptor​(Collection<String> commonWords,
                                                boolean queryMode)
        Parameters:
        commonWords - list of common words
        queryMode - whether to optimize for query which means only returning single words when they are not a member of a bigram.
    • Method Detail

      • isQueryMode

        public boolean isQueryMode()