# Edge Ngram search text greater than max\_gram

**URL:** <https://discuss.elastic.co/t/edge-ngram-search-text-greater-than-max-gram/61552>\
**Category:** Elasticsearch\
**Created:** [September 27, 2016, 4:01am UTC](https://discuss.elastic.co/t/edge-ngram-search-text-greater-than-max-gram/61552 "2016-09-27T04:01:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chakkasm](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@chakkasm](https://discuss.elastic.co/u/chakkasm)\
**Post date:** [September 27, 2016, 4:01am UTC](https://discuss.elastic.co/t/edge-ngram-search-text-greater-than-max-gram/61552/1 "2016-09-27T04:01:47Z")

</div>

We have implemented type ahead functionality using Edge Ngram with min\_gram:3 and max\_gram:20 on email text field.

We have one more requirement where user can enter text more than 20 characters in the email field and expectation is to fetch any matching email address. Basically the searchText length is more than max\_gram length and when I use either prefix query or term query no results returned.

Do I need to have one more field to support searching text more than 20 characters?? I don't want to increase max\_gram length. Using a new field I am planning to use prefix query.

Please suggest any other better alternate.

---

<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 5, 2017, 10:17pm UTC](https://discuss.elastic.co/t/edge-ngram-search-text-greater-than-max-gram/61552/2 "2017-07-05T22:17:05Z")

</div>


