Class CommonGramsTokenFilterDescriptor

  • All Implemented Interfaces:

    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
    • Constructor Detail

      • CommonGramsTokenFilterDescriptor

        public CommonGramsTokenFilterDescriptor​(Collection<String> commonWords,
                                                boolean queryMode)
        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()