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