Whitespace analyzer issue

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/' -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...

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

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

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