# Find values which are the substrings of query word

**URL:** <https://discuss.elastic.co/t/find-values-which-are-the-substrings-of-query-word/126683>\
**Category:** Elasticsearch\
**Created:** [April 4, 2018, 7:02am UTC](https://discuss.elastic.co/t/find-values-which-are-the-substrings-of-query-word/126683 "2018-04-04T07:02:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_k/32/29543_2.png) [@Atul\_K](https://discuss.elastic.co/u/Atul_K)\
**Post date:** [April 4, 2018, 7:02am UTC](https://discuss.elastic.co/t/find-values-which-are-the-substrings-of-query-word/126683/1 "2018-04-04T07:02:54Z")

</div>

Hello,  
I am working on a problem of identifying email patterns if you are given an email address.  
I have a dataset of surnames. If I pass an email address to elasticsearch it should return matching surnames inside that email address. In other words I am looking for a method to find out all the results where results are substring of query string.  
For example, if my query string is _ajohnson_ then elasticsearch should return me _johnson_ from surname dataset.

---

<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:** [May 2, 2018, 7:02am UTC](https://discuss.elastic.co/t/find-values-which-are-the-substrings-of-query-word/126683/2 "2018-05-02T07:02:56Z")

</div>

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