My objective is to be able to search for words with parenthesis around them, for example:
(Andy)
From what I can tell if I do a Mapping Charfilter and change the parenthesis to underscores this will accomplish what I'm after.
"index" : {
"analysis" : {
"char_filter" : {
"my_mapping" : {
"type" : "mapping",
"mappings" : ["( => _", ") => _"]
}
},
"analyzer" : {
"custom_with_char_filter" : {
"tokenizer" : "standard",
"char_filter" : ["my_mapping"]
},
}
}
}
}';
When I run the above I get the following error:
{"error":"ElasticSearchParseException[failed to parse source for create index]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: [B@70de7f1b; line: 15, column: 14]]; ","status":400}