我是弹性研究和kibana的新手
我正在使用elasticsearch进行一些练习(创建索引,类型和文档......)
我用类型'building'创建了一个索引'business'
put /business/building/217
{
"adresse":"11 Pen Ave",
"floors":5,
"offices":7,
"loc":{
"lat":40.693479,
"lon":-73.983854
}
}
Run Code Online (Sandbox Code Playgroud)
它很有趣,但当我试图创建这样的另一种类型
put /business/employee/330
{
"name":"Richard Bell",
"title":"Senior Accountant",
"salar_usd":115000.00,
"hiredate":"Jan 19, 2013"
}
Run Code Online (Sandbox Code Playgroud)
然后我收到了这个错误
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [business] as the final mapping would have more than 1 type: [employee, building]"
}
],
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [business] as the final mapping would have more than 1 type: [employee, building]"
},
"status": …Run Code Online (Sandbox Code Playgroud)