# Substring query with wildcards and reserved characters

**URL:** <https://discuss.elastic.co/t/substring-query-with-wildcards-and-reserved-characters/99056>\
**Category:** Elasticsearch\
**Created:** [August 31, 2017, 8:53pm UTC](https://discuss.elastic.co/t/substring-query-with-wildcards-and-reserved-characters/99056 "2017-08-31T20:53:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatthewHartz](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@MatthewHartz](https://discuss.elastic.co/u/MatthewHartz)\
**Post date:** [August 31, 2017, 8:53pm UTC](https://discuss.elastic.co/t/substring-query-with-wildcards-and-reserved-characters/99056/1 "2017-08-31T20:53:28Z")

</div>

I have a question very similar to [Hyphen search with wildcard '\*' and normal serach](https://discuss.elastic.co/t/hyphen-search-with-wildcard-and-normal-serach/9984).

My requirement is I want to be able to do a substring query, in which that substring can contain special characters. For example, I want to be able to query on a list of fields, and in that query I can contain a special character and look for fields that contain that special character as well.

For example:  
query: e&S search should pull back a result of joe&sally for example.

Configuration:  
I'm using the whitespace analyzer, wrapping all words with wildcards, and escaping all reserved characters. What else can I do?

Thanks,  
Matthew

---

<div class="post-metadata">

**Author:** ![MatthewHartz](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@MatthewHartz](https://discuss.elastic.co/u/MatthewHartz)\
**Post date:** [September 1, 2017, 4:13pm UTC](https://discuss.elastic.co/t/substring-query-with-wildcards-and-reserved-characters/99056/2 "2017-09-01T16:13:47Z")

</div>

bump 🙂

---

<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:** [September 29, 2017, 4:13pm UTC](https://discuss.elastic.co/t/substring-query-with-wildcards-and-reserved-characters/99056/3 "2017-09-29T16:13:54Z")

</div>

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