# Elasticsearch index not\_analyzed

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932>\
**Category:** Elasticsearch\
**Created:** [December 24, 2015, 11:04am UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932 "2015-12-24T11:04:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![guoyiqin](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@guoyiqin](https://discuss.elastic.co/u/guoyiqin)\
**Post date:** [December 24, 2015, 11:04am UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932/1 "2015-12-24T11:04:03Z")

</div>

I have a data, example:  
a b  
this data beginning with multiple spaces and more than one space between this data.  
My mapping set no\_analyzed, save this data to es,when search this data,This data has only one space, example:  
a b  
I don't know why this is.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [December 24, 2015, 12:50pm UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932/2 "2015-12-24T12:50:29Z")

</div>

Can you provide us with a recreation of the bug? For instance using curl commands.

---

<div class="post-metadata">

**Author:** ![guoyiqin](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@guoyiqin](https://discuss.elastic.co/u/guoyiqin)\
**Post date:** [December 25, 2015, 1:48am UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932/3 "2015-12-25T01:48:56Z")

</div>

1.curl -XPOST '[http://10.3.35.24:9200/aposts](http://10.3.35.24:9200/aposts)' -d '{  
"mappings": {  
"post": {  
"properties": {  
"msg": {  
"type": "string",  
"index": "not\_analyzed",  
"store": "yes"  
}  
}  
}  
}  
}'

2.curl -XPUT [http://10.3.35.24:9200/aposts/post/q](http://10.3.35.24:9200/aposts/post/q) -d '{"msg": " a b"}'

3.I use elasticsearch web ui Any Request perform a search command {"query":{"match\_all":{}}},give me return result is " a b".I think that it is " a b". Why space is gone?There are multiple spaces between a and b, but query results and only one space.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 25, 2015, 2:08am UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932/4 "2015-12-25T02:08:03Z")

</div>

What happens if you run a curl command to search?

What is "elastsearch web UI"?

---

<div class="post-metadata">

**Author:** ![guoyiqin](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@guoyiqin](https://discuss.elastic.co/u/guoyiqin)\
**Post date:** [December 25, 2015, 2:15am UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932/5 "2015-12-25T02:15:50Z")

</div>

My original data has multiple consecutive spaces, but I looked at the results of only a single space .  
elasticsearch web UI is port 9200.  
I found ths problem, browser parsed consecutive spaces to one space.

---

<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:28pm UTC](https://discuss.elastic.co/t/elasticsearch-index-not-analyzed/37932/6 "2017-07-05T23:28:39Z")

</div>


