I am currently researching how to optimize my queries using n-grams. I decided to use Elasticsearch to generate the n-grams, so I set up a trial account. I managed to get n-grams from a sample string, but I got the following error message:
Min shingle size must be >= 2
I am afraid I need shingles with size 1, so I want to ask whether that is possible. Do you think it is appropriate to use Elasticsearch to get n-grams as shingles?
You can configure output_unigrams: true if you want the shingle filter to always emit the unigram shingle token. Or you can configure output_unigrams_if_no_shingles: true if you want the unigram to be emitted only when there aren't multi-gram shingles.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.