elasticsearch - 使用 Postman 创建 ElasticSearch 索引时出错
问题描述
我正在尝试使用官方 javascript 客户端创建一个带有映射的弹性搜索索引。当我尝试在没有索引的情况下创建时,一切顺利,但在创建索引时出现错误。
这是我的架构:
{
"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
}
解决方案
推荐阅读
- ms-access - 对象“应用程序”的方法“LoadFromText”失败
- sql - 自动调度要导出到 csv 文件的 SQL 查询结果
- haskell - 关联列表的镜头
- python - 如何让 python-docx 处理复杂的脚本?
- python - Python paramiko - 使用公私钥对 (PuTTY) 连接 Linux 服务器
- c# - 按下按钮更改值时绑定目标未更新
- c# - ASP.Net MVC5 中的 SmtpClient.SendAsync() 和 IDisposable
- python - Django:将查询结果分解为多个常见元素列表
- ios - 在扩展 swift 中覆盖 - 不能或不应该?
- arrays - 如果数组中的项目存在,则替换它的简单方法,如果不存在则追加它