Class NGramAnalyzer


  • public final class NGramAnalyzer
    extends SearchAnalyzer
    An Analyzer capable of producing n-grams from a specified input in a range of min..max (inclusive). Can optionally preserve the original input.

    This Analyzer type can be used to implement substring matching. Note that it slices the input based on bytes and not characters by default (streamType). The “binary” mode supports single-byte characters only; multi-byte UTF-8 characters raise an Invalid UTF-8 sequence query error.

    Author:
    Michele Rastelli
    See Also:
    API Documentation