When I sync my data from MongoDB to Elasticsearch ,I want to add a mapping in my index. I found:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [content] conflicts with existing mapping in other types:\n[mapper [content] has different [analyzer]]"}],"type":"illegal_argument_exception","reason":"Mapper for [content] conflicts with existing mapping in other types:\n[mapper [content] has different [analyzer]]"},"status":400}
Because the content field has been setted defualt: ignore_above:256. Like this:
$ curl localhost:9200/poetry/_mapping?pretty
{
"poetry" : {
"mappings" : {
"fulltext" : {
"properties" : {
"content" : {
"type" : "text",
"ignore_above" : 256
}
}
}
}
}
}
When I sync my data from MongoDB to Elasticsearch ,I want to add a mapping in my index. I found:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [content] conflicts with existing mapping in other types:\n[mapper [content] has different [analyzer]]"}],"type":"illegal_argument_exception","reason":"Mapper for [content] conflicts with existing mapping in other types:\n[mapper [content] has different [analyzer]]"},"status":400}
Because the content field has been setted defualt: ignore_above:256. Like this: $ curl localhost:9200/poetry/_mapping?pretty { "poetry" : { "mappings" : { "fulltext" : { "properties" : { "content" : { "type" : "text", "ignore_above" : 256 } } } } } }