# Edge N-gram at word level

**URL:** <https://discuss.elastic.co/t/edge-n-gram-at-word-level/279166>\
**Category:** Elasticsearch\
**Created:** [July 20, 2021, 1:21pm UTC](https://discuss.elastic.co/t/edge-n-gram-at-word-level/279166 "2021-07-20T13:21:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmoreram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmoreram/32/87391_2.png) [@mmoreram](https://discuss.elastic.co/u/mmoreram)\
**Post date:** [July 20, 2021, 1:21pm UTC](https://discuss.elastic.co/t/edge-n-gram-at-word-level/279166/1 "2021-07-20T13:21:38Z")

</div>

In Elasticsearch, edge n-gram divides a word into progressive tokens, starting from the begining, and adding a new letter per each token.

Is there a way to add the same logic at word level?

> "This is a sentence"

> ["This", "This is", "This is a", "This is a sentence"]

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2021, 1:40pm UTC](https://discuss.elastic.co/t/edge-n-gram-at-word-level/279166/2 "2021-07-20T13:40:38Z")

</div>

Have a look at [Shingle token filter | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-shingle-tokenfilter.html) but it's more a ngram like than a edge n gram.

---

<div class="post-metadata">

**Author:** ![mmoreram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mmoreram/32/87391_2.png) [@mmoreram](https://discuss.elastic.co/u/mmoreram)\
**Post date:** [July 20, 2021, 1:47pm UTC](https://discuss.elastic.co/t/edge-n-gram-at-word-level/279166/3 "2021-07-20T13:47:38Z")

</div>

Thanks for answering, David.

Yes. Shingle acts as an n-gram filter, but I'd like to make it edge n-gram style.

> edge shingle

---

<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:** [August 17, 2021, 1:48pm UTC](https://discuss.elastic.co/t/edge-n-gram-at-word-level/279166/4 "2021-08-17T13:48:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
