# Whitespace analyzer issue

**URL:** <https://discuss.elastic.co/t/whitespace-analyzer-issue/104768>\
**Category:** Elasticsearch\
**Created:** [October 21, 2017, 4:35pm UTC](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768 "2017-10-21T16:35:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ESlearner](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@ESlearner](https://discuss.elastic.co/u/ESlearner)\
**Post date:** [October 21, 2017, 4:35pm UTC](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768/1 "2017-10-21T16:35:31Z")

</div>

I would like to get help on using the whitespace analyzer.  
Here is the code snippet I am using ....

curl -XPUT '[http://localhost:9200/myindex/](http://localhost:9200/myindex/)' -d '  
{  
"settings": {  
"number\_of\_shards": 1,  
"number\_of\_replicas": 0  
},  
"mappings": {  
"wikipage": {  
"\_all": {"type" : "string", "index" : "analyzed", "analyzer" : "whitespace"},  
"properties" : {  
"title" : {"type": "string", "index" : "analyzed" , "analyzer" : "whitespace"},  
"url" : {"type": "string", "index" : "analyzed" , "analyzer" : "whitespace"},  
"abstract" : {"type": "string", "index" : "analyzed", "analyzer" : "whitespace"},  
"section" : {"type": "string", "index" : "analyzed" , "analyzer" : "whitespace"},  
}  
}  
}  
}

When i execute this command i get an error like below :  
{  
"error" : {  
"root\_cause" : [  
{  
"type": "parse\_exception",  
"reason": "Failed to parse content to map"  
}  
],

"type" : "parse\_exception"  
"reason": "Failed to parse content to map"  
"caused\_by" : {  
"type" : "json\_parse\_exception",  
"reason" : "Unexpected character ('u' (code 117): was expecting a colon to separate field name and value \n at [Source:org.elasticsearch...line 1 column 280]"

Kind of stuck any help is much appreciated. (P.S New to ES , pls pardon any rudimentary questions)  
Thanks...

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 22, 2017, 12:32pm UTC](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768/2 "2017-10-22T12:32:47Z")

</div>

I cannot reproduce the issue, but there is definitely and extra comma at the end of the `section` field that shouldn't be there.

> [@ESlearner](#):
>
> "section" : {"type": "string", "index" : "analyzed" , "analyzer" : "whitespace"},

---

<div class="post-metadata">

**Author:** ![ESlearner](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@ESlearner](https://discuss.elastic.co/u/ESlearner)\
**Post date:** [October 28, 2017, 3:03am UTC](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768/3 "2017-10-28T03:03:44Z")

</div>

I apologize for the late reply. That was indeed the issue. Really appreciate your help.

---

<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:** [November 25, 2017, 3:04am UTC](https://discuss.elastic.co/t/whitespace-analyzer-issue/104768/4 "2017-11-25T03:04:23Z")

</div>

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