【发布时间】:2019-11-04 17:57:50
【问题描述】:
我正在尝试实施 Micrometer Elasticsearch 注册表,但出现以下错误
{
"took": 158,
"errors": true,
"items": [
{
"index": {
"_index": "metrics-2019-11",
"_type": "doc",
"_id": "PDzhNm4BiJBtovrbDFDF",
"status": 400,
"error": {
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [metrics--2019-11] as the final mapping would have more than 1 type: [_doc, doc]"
}
}
},
{
"index": {
"_index": "metrics--2019-11",
"_type": "doc",
"_id": "PTzhNm4BiJBtovrbDFDF",
"status": 400,
"error": {
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [metrics--2019-11] as the final mapping would have more than 1 type: [_doc, doc]"
}
}
}
]
}
我不得不说我不太理解错误,千分尺是否试图将同一个文档推送到2个不同的键(doc和_doc)?
我在文档中没有看到任何关于文档类型或其密钥或任何相关内容的信息
同样,索引没有事先创建,我让千分尺创建它们,所以这怎么行不通。
弹性搜索 7.4.2
千分尺 1.2.1
春季启动 2.1.2
【问题讨论】:
-
这个问题你解决了吗?我有几个 Spring 应用程序向 elasticsearch 发布指标,其中只有一个面临这个问题。
-
是的,我做到了,但不记得是怎么回事,这是配置中的愚蠢行为。可惜我没有回来更新问题
标签: spring-boot elasticsearch micrometer