# Index on words with spaces

**URL:** <https://discuss.elastic.co/t/index-on-words-with-spaces/27831>\
**Category:** Elasticsearch\
**Created:** [August 21, 2015, 1:07pm UTC](https://discuss.elastic.co/t/index-on-words-with-spaces/27831 "2015-08-21T13:07:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkpandey](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mkpandey](https://discuss.elastic.co/u/mkpandey)\
**Post date:** [August 21, 2015, 1:07pm UTC](https://discuss.elastic.co/t/index-on-words-with-spaces/27831/1 "2015-08-21T13:07:14Z")

</div>

We are facing issue on elastic search index. When I create Index on words e.g Polo Shirts, what its doing is creating two Indexs one on Polo and another on Shirts. However I am expecting only one Index on Polo Shirts only.

Any one has faced the similar issue or any idea please.

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [August 21, 2015, 1:27pm UTC](https://discuss.elastic.co/t/index-on-words-with-spaces/27831/2 "2015-08-21T13:27:40Z")

</div>

When you say "index", do you mean an Elasticsearch index (e.g. the thing that has primary and replica shards)? Or do you mean the strings inside of documents are being tokenized on whitespace?

If you meant the latter, it is because full-text string fields are by default analyzed with the `standard` analyzer, which includes a tokenizer that breaks a string into tokens based on whitespace, special characters, etc. I'd recommend reading through the [Analysis section of the Definitive Guide](https://www.elastic.co/guide/en/elasticsearch/guide/current/analysis-intro.html) for more information on how analysis works in Elasticsearch -- it is a critical component to understanding how and why search works.

If you want to search for exact phrases, you could do one of several things:

- Use a phrase query (or match query with phrase mode enabled)

- Use an analyzer that does not tokenize on whitespace (e.g. the `keyword` tokenizer)

- Index the field as `not_analyzed`, which will not perform any analysis and therefore no tokenization.

---

<div class="post-metadata">

**Author:** ![mkpandey](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mkpandey](https://discuss.elastic.co/u/mkpandey)\
**Post date:** [August 22, 2015, 5:20am UTC](https://discuss.elastic.co/t/index-on-words-with-spaces/27831/3 "2015-08-22T05:20:23Z")

</div>

Many Thanks

Thanks & Regards  
Mukesh Pandey  
m- 8826597211

---

<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:54pm UTC](https://discuss.elastic.co/t/index-on-words-with-spaces/27831/4 "2017-07-05T23:54:25Z")

</div>


