Find values which are the substrings of query word

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.

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