The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true

这篇具有很好参考价值的文章主要介绍了The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

创建es索引模板时报错,因为es7不支持type了,只有一个默认的_doc。

解决方法:在url里设置 include_type_name=true


PUT http://10.10.101.140:30092/_template/testaa?include_type_name=true

{
"order":1,
"index_patterns":["testaa-*"],
"mappings":{
    "_doc":{
   "properties":{
     "middleware_name":{
        "type":"keyword",
        "index":true
     },
     "k8s_pod_namespace":{
        "type":"keyword",
        "index":true
     },
     "query":{
        "type":"text",
        "index":true,
        "analyzer":"ik_max_word"
     }
    }
    }
},
"settings":{
   "index": {
      "max_result_window": "30000000"
    }
}
}

Error create index template in ES 6.7 - Elasticsearch - Discuss the Elastic Stack文章来源地址https://www.toymoban.com/news/detail-529060.html

到了这里,关于The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Goland Cannot use ‘err‘ (type error) as the type any

    问题描述: 用Goland写代码的时候,使用panic总是报错,官方用法也是报错,最后找到官方回复的链接,https://youtrack.jetbrains.com/issue/GO-12179/Cannot-use-err-type-error-as-the-type-any 问题解决方式: Update the IDE instance to the latest available version: 2021.3.4. 就是升级你的GoLand升级到2021.3.4,好像

    2024年02月07日
    浏览(40)
  • 【the import cannot be resolved问题可以通过以下方法解决】

    eclipse 导入的项目后,src源码类文件代码的import xx.xxx.xx 识别不了其他包的类。提示the import can not be resolved project-clean ,重新编译项目; 引入源码文件 , 右键项目-build path - Config build path-source-add folder-选中每个module中的src; 重新导入依赖jar包 ,右键项目-build path - Config buil

    2024年02月11日
    浏览(30)
  • RuntimeError: Input type (unsigned char) and bias type (float) should be the same错误

    这个错误通常是由于输入数据类型与模型参数的类型不匹配导致的。在PyTorch中,当输入的张量类型与模型的参数类型不匹配时,PyTorch会尝试将它们转换为相同的类型,但是当它们的类型不可转换时,就会出现这个错误。 解决办法是确保输入的张量类型与模型的参数类型相同

    2024年02月15日
    浏览(30)
  • Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same

    RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor 错误原因: 这个错误提示表明输入数据的类型和模型权重的类型不匹配,可能是因为模型权重是在GPU上训练的,而输入数据是在CPU上进行的。 可以

    2024年02月06日
    浏览(56)
  • RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the

    问题描述: mobilenetv3在残差块中加入了注意力机制 用GPU 进行训练时报的错 解决方法1: 1,不用GPU 用CPU 就可以 CUDA 设置为False,确实可以解决,但是不用GPU 好像意义不大 解决方法2 : 用仍然用GPU ,看下面的的解决方案: 报错的原因:2 1,我直接在倒残差块的前向传播内对导

    2024年02月16日
    浏览(27)
  • RuntimeError: result type Float can‘t be cast to the desired output type long int

    在使用yolov5训练自定义数据集的运行过程中报错: **RuntimeError: result type Float can‘t be cast to the desired output type long int ** 并不是自己构建的数据集有问题或者是下载更改后的代码有问题。 问题原因: 从Github上clone 的yolov5-master版本的代码是可以直接运行的,因为官网上clone 的代

    2024年02月14日
    浏览(35)
  • Latex找不到字体:Package fontspec: The font “simsun“ cannot be found

    用Latex模板编译的时候找不到字体报错: Package fontspec: The font \\\"simsun\\\" cannot be found 根据知乎上的一个评论解决了,注释掉模板文件.cls文件中关于newtx的内容就行,参考网址: Latex 报错:The font cannot be found. 怎么解决? - 沐祁的回答 - 知乎 https://www.zhihu.com/question/368619069/answer/2

    2023年04月08日
    浏览(25)
  • Tomcat报错:cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map

    启动tomcat时会报如下错误,原因是tomcat与jdk的版本不匹配。当然要因情况而异,给大家一个解决方法的思路 这是从tomcat官方文档中找到对应的jdk版本 后记 并不是tomcat与jdk版本匹配就一定不会问题,产生这个问题是我启动activiti-app时发生的,当时我的tomcat是9,JDK是11后来又换

    2024年01月21日
    浏览(27)
  • eclipse报错:Multiple annotations found at this line: - String cannot be resolved to a type 解决方法

    写老师布置的作业从机房copy到自己的电脑上发现报错了,以下是报错信息: Multiple annotations found at this line: 在该行中找到的多个注释 - String cannot be resolved to a type -string不能解析为类型 - The method getParameter(String) from the type ServletRequest refers to the missing tye string 从ServletRequest类型

    2024年02月10日
    浏览(26)
  • unity 发布报错 The type or namespace name `UnityEditor‘ could not be found.

    引用了UnityEditor的内容,发布当然会报错啦 加上宏判断就好啦

    2024年02月12日
    浏览(37)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包