每当我尝试提供以下映射时,我都会收到错误。
你需要为" copy_to"。
做些什么PUT myindex/mytype/_mapping
{
"mappings": {
"properties": {
"manufacturer": {
"type": "string",
"copy_to": "full_make_model_name"
},
"name": {
"type": "string",
"copy_to": "full_make_model_name"
},
"full_make_model_name": {
"type": "string",
"index": "analyzed"
}
}
}
}
答案 0 :(得分:1)
尝试:
PUT myindex/_mapping/mytype
{
"properties": {
"manufacturer": {
"type": "string",
"copy_to": "full_make_model_name"
},
"name": {
"type": "string",
"copy_to": "full_make_model_name"
},
"full_make_model_name": {
"type": "string",
"index": "analyzed"
}
}
}
答案 1 :(得分:0)
我的ES版本是7.2,我解决了这个问题
"mappings":{
"properties":{
"article":{
"properties":{
"id":{"type": "long","store": true},
"title":{"type": "text","store": true,"index": true,"analyzer": "standard"},
"content":{"type": "text","store": true,"index": true,"analyzer": "standard"}
}
}
}
}