当我尝试使用其设置创建索引时,出现此错误 “字段[type]上属性[fields]的预期映射,但有一个类java.lang.String”
注意:我正在使用elasticsearch 5.4.2版本 如何解决此问题?请
我的下面的代码:
PUT my_index2
{"settings": {
"analysis": {
"filter": {
"french_stop": {
"type": "stop",
"stopwords": ["du", "d", "de"]
},
"french_elision": {
"type": "elision",
"articles_case": true,
"articles": ["l","m","t","qu","n","s","j","d","c","jusqu","quoiqu","lorsqu","puisqu"]
},
"french_stemmer": {
"type": "stemmer",
"language": "light_french"
}
},
"analyzer": {
"custom_french": {
"tokenizer": "standard",
"filter": [
"french_elision",
"lowercase",
"french_stemmer",
"french_stop"
]
}
}
}
},
"mappings": {
"my_type": {
"properties": {
"cars":{
"type": "nested",
"properties": {
"type": "nested",
"property": {
"type": "nested"},
"car":{
"type": "nested",
"properties": {
"property": {
"type": "nested",
"analyzer":"custom_french"}
}
}
}
}
}
}
}
}