elasticsearch,micrometer,Spring Boot,elasticsearch,Micrometer" /> elasticsearch,micrometer,Spring Boot,elasticsearch,Micrometer" />

Spring boot 测微计无法将度量保存到elasticsearch,因为最终映射将有多个类型:[[u doc,doc]

Spring boot 测微计无法将度量保存到elasticsearch,因为最终映射将有多个类型:[[u doc,doc],spring-boot,elasticsearch,micrometer,Spring Boot,elasticsearch,Micrometer,我正在尝试实现测微计Elasticsearch注册表,我得到以下错误 { "took": 158, "errors": true, "items": [ { "index": { "_index": "metrics-2019-11", "_type": "doc", "_id": "PDzhNm4BiJBtovrbDFDF", "status": 40

我正在尝试实现测微计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]"
          }
        }
      }
    ]
  }
我不得不说,我不太理解这个错误,测微计是否试图将同一个文档推送到两个不同的键(doc和_doc)

我在文档中没有看到任何关于文档类型或其键或相关内容的信息

此外,指数还没有事先创建,我让测微计创建了它们,所以这是怎么不起作用的

Elasticsearch 7.4.2

千分尺1.2.1


Spring boot 2.1.2

我在使用不兼容版本的
Spring boot gradle插件
mavenBom
时遇到了这个错误

例如,我的build.gradle文件中包含以下内容:

buildscript {
...
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:2.2.5.RELEASE"
    }
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:Greenwich.SR1"
    }
}
但是
2.2.5.RELEASE
Greenwich.SR1
不在同一位置。将“Bom”版本更改为
Hoxton.SR1
修复了该问题


即使您没有使用gradle,问题也可能是因为不兼容的依赖版本。

您解决了这个问题吗?我有几个spring应用程序将度量发布到elasticsearch,其中只有一个面临这个问题。是的,我有,不记得是怎么回事,配置中有点愚蠢。糟糕的是,我没有回来更新这个问题