# Query String with WhiteSpace

**URL:** <https://discuss.elastic.co/t/query-string-with-whitespace/6417>\
**Category:** Elasticsearch\
**Created:** [January 17, 2012, 11:36pm UTC](https://discuss.elastic.co/t/query-string-with-whitespace/6417 "2012-01-17T23:36:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaun\_Farrell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaun_farrell/32/2827_2.png) [@Shaun\_Farrell](https://discuss.elastic.co/u/Shaun_Farrell)\
**Post date:** [January 17, 2012, 11:36pm UTC](https://discuss.elastic.co/t/query-string-with-whitespace/6417/1 "2012-01-17T23:36:05Z")

</div>

If I have a name "abcdef" in my index and I do a search for "abcdef" I get  
the result however if I do the search "abc%20def" i don't get the result.  
Is there a way to join those and sort of ignore the whitespace. I don't  
want to totally ignore it but I would like abcdef to show up when I do that  
search with the space and other relavant results.

Is there an easy way to do this?

Thanks,

Shaun Farrell

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [January 18, 2012, 8:58am UTC](https://discuss.elastic.co/t/query-string-with-whitespace/6417/2 "2012-01-18T08:58:20Z")

</div>

options:

1. You could preprocess the query yourself.
2. You could index it via ngram filter
3. You could somehow use the word delimiter filter - not sure about  
your exact requirement
4. etc

Peter.

On 18 Jan., 00:36, Shaun Farrell [farrel...@gmail.com](mailto:farrel...@gmail.com) wrote:

> If I have a name "abcdef" in my index and I do a search for "abcdef" I get  
> the result however if I do the search "abc%20def" i don't get the result.  
> Is there a way to join those and sort of ignore the whitespace. I don't  
> want to totally ignore it but I would like abcdef to show up when I do that  
> search with the space and other relavant results.
> 
> Is there an easy way to do this?
> 
> Thanks,
> 
> Shaun Farrell

---

<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 6, 2017, 3:42am UTC](https://discuss.elastic.co/t/query-string-with-whitespace/6417/3 "2017-07-06T03:42:24Z")

</div>


