我正在尝试使用官方的javascript客户端创建一个带有Map的ElasticSearch索引。当我尝试在没有索引的情况下创建时,一切都很顺利,但在创建索引时,我遇到了一个错误。
下面是我的模式:
{
"mappings":{
"post":{
"properties":{
"city":{
"type": "text"
},
"contact_email":{
"type": "text"
},
"country":{
"type": "text"
},
"description":{
"type": "text"
},
"image":{
"type": "text"
},
"post_id":{
"type": "text"
},
"state_province":{
"type": "text"
},
"title":{
"type": "text"
},
"user_id":{
"type": "text"
}
}
}
}
}
当我执行上面的命令时,我得到这个错误:
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [post : {properties={country={type=text}, image={type=text}, post_id={type=text}, city={type=text}, user_id={type=text}, description={type=text}, state_province={type=text}, title={type=text}, contact_email={type=text}}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [post : {properties={country={type=text}, image={type=text}, post_id={type=text}, city={type=text}, user_id={type=text}, description={type=text}, state_province={type=text}, title={type=text}, contact_email={type=text}}}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [post : {properties={country={type=text}, image={type=text}, post_id={type=text}, city={type=text}, user_id={type=text}, description={type=text}, state_province={type=text}, title={type=text}, contact_email={type=text}}}]"
}
},
"status": 400
}
1条答案
按热度按时间yduiuuwa1#
也许你想念布景。你可以试试这个