pdb.ngram(2,5) will generate tokens of size 2, 3, 4, and 5.
To generate grams of a single fixed length, set the minimum and maximum gram size equal to each other.
Expected Response
Ngram Prefix Only
The generate ngram tokens for only the firstn characters in the text, set prefix_only to true.
Expected Response
Phrase and Proximity Queries with Ngram
Because multiple ngram tokens can overlap, the ngram tokenizer does not store token positions. As a result, queries that rely on token positions like phrase, phrase prefix, regex phrase and proximity are not supported over ngram-tokenized fields. An exception is if the min gram size equals the max gram size, which guarantees unique token positions. In this case, settingpositions=true enables these queries.