# Ngram token filter omits tokens less than min\_gram number

**URL:** <https://discuss.elastic.co/t/ngram-token-filter-omits-tokens-less-than-min-gram-number/15497>\
**Category:** Elasticsearch\
**Created:** [January 30, 2014, 11:06am UTC](https://discuss.elastic.co/t/ngram-token-filter-omits-tokens-less-than-min-gram-number/15497 "2014-01-30T11:06:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Kumar\_Peruma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_kumar_peruma/32/1838_2.png) [@Krishna\_Kumar\_Peruma](https://discuss.elastic.co/u/Krishna_Kumar_Peruma)\
**Post date:** [January 30, 2014, 11:06am UTC](https://discuss.elastic.co/t/ngram-token-filter-omits-tokens-less-than-min-gram-number/15497/1 "2014-01-30T11:06:33Z")

</div>

Hi,

We are using the following settings

curl -XPUT 'localhost:9200/documents5' -d '  
{  
"settings" : {  
"analysis" : {  
"filter" : {  
"pp\_ngram":{  
"type":"nGram", "min\_gram": 3, "max\_gram": 50  
}  
},  
"analyzer" : {  
"name\_index\_analyzer" : {  
"type": "custom",  
"tokenizer" : "standard",  
"filter" : ["word\_delimiter", "lowercase", "pp\_ngram"]  
}  
}  
}  
}  
}'

curl  
'localhost:9200/documents5/\_analyze?pretty=1&analyzer=name\_search\_analyzer'  
-d 'API RP 65 Part2.pdf' | grep -w token  
"token" : "api",  
"token" : "par",  
"token" : "part",  
"token" : "art",  
"token" : "pdf",

_We are missing "RP" and "65" tokens._ Shouldn't it simple add tokens which  
have less than min\_gram size?

Is it possible to accomplish this with any other possible configuration /  
setting.

/Krishna

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a0bdf64c-ce47-4b1d-bd45-8754288eadcb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a0bdf64c-ce47-4b1d-bd45-8754288eadcb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:53am UTC](https://discuss.elastic.co/t/ngram-token-filter-omits-tokens-less-than-min-gram-number/15497/2 "2017-07-06T01:53:59Z")

</div>


