# Elasticsearch Escape WhiteSpace Character

**URL:** <https://discuss.elastic.co/t/elasticsearch-escape-whitespace-character/29190>\
**Category:** Elasticsearch\
**Created:** [September 13, 2015, 11:52am UTC](https://discuss.elastic.co/t/elasticsearch-escape-whitespace-character/29190 "2015-09-13T11:52:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stormcloak](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@stormcloak](https://discuss.elastic.co/u/stormcloak)\
**Post date:** [September 13, 2015, 11:52am UTC](https://discuss.elastic.co/t/elasticsearch-escape-whitespace-character/29190/1 "2015-09-13T11:52:47Z")

</div>

I have two records in my index.  
This records;

```
> var person = new Person
> {
> Id = "1",
> Firstname = "john smith",
> Lastname = "hendrick"
> };
> var person2 = new Person
> {
> Id = "2",
> Firstname = "smith john",
> Lastname = "hendrick"
> };

```

In kibana, I am writing this query _joh\ smith_\*. And i want to result only **"John Smith"**.But result is empty.Also i try with quotes querystring _"joh smith"_\* still result is empty.What can i do this querystring ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 13, 2015, 9:39pm UTC](https://discuss.elastic.co/t/elasticsearch-escape-whitespace-character/29190/2 "2015-09-13T21:39:54Z")

</div>

Because the default behaviour is for the analyser to break tokens (words) up by whitespaces.

You will want to set that field to non-analysed in the mappings if you want to be able to query it exactly as it is indexed.

---

<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 5, 2017, 11:50pm UTC](https://discuss.elastic.co/t/elasticsearch-escape-whitespace-character/29190/3 "2017-07-05T23:50:35Z")

</div>


