ElasticSearch为索引库添加静态映射报:Failed to parse mapping [properties]: Root mapping definition has unsupport

2023-05-16

代码

PUT /my_index
{
  "mappings": {
      "properties": {
        "title": {
          "type": "text",
          "index": true,
          "store": true,
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        },
        "category": {
          "type": "keyword",
          "index": true,
          "store": true
        },
        "images": {
          "type": "keyword",
          "index": true,
          "store": true
        },
        "price": {
          "type": "integer",
          "index": true,
          "store": true
        }
      
    }
  }
}

报错信息

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Root mapping definition has unsupported parameters:  [images : {index=true, store=true, type=keyword}] [price : {index=true, store=true, type=integer}] [title : {search_analyzer=ik_max_word, analyzer=ik_max_word, index=true, store=true, type=text}] [category : {index=true, store=true, type=keyword}]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping [properties]: Root mapping definition has unsupported parameters:  [images : {index=true, store=true, type=keyword}] [price : {index=true, store=true, type=integer}] [title : {search_analyzer=ik_max_word, analyzer=ik_max_word, index=true, store=true, type=text}] [category : {index=true, store=true, type=keyword}]",
    "caused_by": {
      "type": "mapper_parsing_exception",
      "reason": "Root mapping definition has unsupported parameters:  [images : {index=true, store=true, type=keyword}] [price : {index=true, store=true, type=integer}] [title : {search_analyzer=ik_max_word, analyzer=ik_max_word, index=true, store=true, type=text}] [category : {index=true, store=true, type=keyword}]"
    }
  },
  "status": 400
}

解决方案

添加一个“article”属性、或者“_doc”

PUT /my_index
{
  "mappings": {
    "article":{
      "properties": {
        "title": {
          "type": "text",
          "index": true,
          "store": true,
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        },
        "category": {
          "type": "keyword",
          "index": true,
          "store": true
        },
        "images": {
          "type": "keyword",
          "index": true,
          "store": true
        },
        "price": {
          "type": "integer",
          "index": true,
          "store": true
        }
      }
    }
  }
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ElasticSearch为索引库添加静态映射报:Failed to parse mapping [properties]: Root mapping definition has unsupport 的相关文章

  • 使用 PropertiesLauncher 启动的 Spring-boot(特定于配置文件)应用程序中出现覆盖应用程序属性的问题

    我在尝试使用文件系统上的覆盖文件中声明的另一个值来覆盖类路径上特定于配置文件的应用程序属性文件中声明的属性时遇到困难 我有一个自动配置的 Spring boot 应用程序 即 使用 EnableAutoconfiguration 有多个配置
  • Spring Boot 2:如何将不同模块的每个 application.yml 文件加载到给定的 Web 或批处理运行器中

    我创建了一个 Spring Boot 应用程序 我想知道是否可以加载不同模块的 upmteens application yml 文件 我有这样的结构 myProject moduleCommons application yml modu
  • 使用外部属性文件执行 jar

    我有一个带有主类的 jar 可以像这样执行 java jar test jar 罐子里有类似的东西 public static void main String args throws IOException InputStream is
  • 使用 KMS 的 AWS RDS 加密是否会影响性能?

    Amazon states https aws amazon com about aws whats new 2015 01 06 amazon rds encryption with kms mysql postgresql that 加
  • 在 Elasticsearch 中对具有一个值的属性进行多个值查询

    我正在尝试在这个查询的基础上进行一些构建 我正在搜索的索引还有一个带有 id 的 实体 字段 因此 一些记录将具有 实体 16 实体 156 等 具体取决于实体的 ID 我需要以这样的方式扩展此查询 以便可以传递数组或某些值列表 例如 te
  • 作为属性的类引用

    谷歌对于这类搜索毫无用处 因为你会得到数亿个结果 其中没有一个与特定问题相关 问题很简单 Delphi 中是否可以有类引用属性 如果是这样 怎么办 这是我尝试过的 type TMyObject class end TMyObjectClas
  • 自定义文件属性

    我需要遵循 在我的申请中 我有文件 需要随时签入和签出的文件 当我从应用程序中签出文档时 我需要将自定义属性添加到文件中 以便稍后在签入文档时可以识别它 我尝试使用以下代码使用 DSOFile 中的 OleDocumentPropertie
  • Swift 1.2 重新声明 Objective-C 方法

    我刚刚从 swift 1 1 更新到 swift 1 2 并得到编译器错误 Method setVacation redeclares Objective C method setVacation 这里有一些代码 var vacation
  • ElasticSearch 嵌套查询 - 排除父文档

    尝试排除其中子文档之一与查询不匹配的顶级文档 对于下面的示例 我尝试排除其嵌套作业之一具有的所有文档current true 并与company name Elastic 但由于嵌套作业文档之一与current false和公司name E
  • 如何在不更改设置的情况下不区分大小写排序

    我的索引名称是 data new 下面是插入索引的代码 test id 1 name A professor Bill Cage accounting id 2 name AB professor Gregg Payne engineeri
  • C# 反射和获取属性

    我有以下虚拟类结构 我试图找出如何从 PeopleList 中 People 类的每个实例获取属性 我知道如何从 People 的单个实例中获取属性 但我无法弄清楚如何从 PeopleList 中获取它 我确信这真的很简单 但有人能指出我正
  • 压缩 Log4j 文件

    是否可以压缩日志文件 我通过 RollingFileAppender 进行 log4j 附加功能 http logging apache org log4j extras 对此表示支持 只需将以下内容添加到您的RollingFileAppe
  • 在流浪机器中使用elasticsearch设置graylog2服务器

    我正在尝试在本地开发计算机上安装graylog2 服务器 但遇到了elasticsearch 设置问题 我的elasticsearch作为服务安装在我的开发机器上运行的vagrant机器上 所以我的elasticsearch没有安装在127
  • 使用 Hibernate 映射 Map

    似乎在我看来 到处都有过时的版本 不再起作用 我的问题看起来很简单 我有一个 Java 类 它映射到 derby 数据库 我正在使用注释 并成功地在数据库中创建了所有其他表 但在这个特定的示例中 我只需要一个 Map 它不使用任何其他类 只
  • 操纵 setter 以避免 null

    通常我们有 public string code get set 如果最终有人将代码设置为 null 我需要避免空引用异常 我尝试这个想法 有什么帮助吗 public string code get set if code null cod
  • 如何在 Javascript 中将字符串数组转换为特定的树结构

    我从后端获取文件路径列表 它代表文件夹结构 如下所示 paths path to file1 doc path to file2 doc foo bar doc 路径的长度是任意的 为了使用文件树组件 角度2树组件 https github
  • 如何动态创建新属性

    如何从对象方法内的给定参数创建属性 class Foo public function createProperty var name val here how can I create a property named var name
  • 如何增加vm.max_map_count?

    我正在尝试在 Ubuntu EC2 计算机 t2 medium 中运行弹性搜索 但我收到消息 最大虚拟内存区域 vm max map count 65530 太低 至少增加到 262144 我怎样才能增加vm max map count v
  • ElasticSearch 映射对分组文档进行折叠/执行操作的结果

    有一个对话列表 每个对话都有一个消息列表 每条消息都有不同的字段和action场地 我们需要考虑到在对话的第一条消息中使用了动作A 在几条消息之后有使用的动作A 1过了一会儿A 1 1等等 有一个聊天机器人意图列表 对对话的消息操作进行分组
  • 数学 - 映射数字

    如何将 a 和 b 之间的数字线性映射到 c 和 d 之间 也就是说 我希望 2 到 6 之间的数字映射到 10 到 20 之间的数字 但我需要广义的情况 我的脑子炸了 如果您的数字 X 位于 A 和 B 之间 并且您希望 Y 位于 C 和

随机推荐

  • Java基础类(六):Collections工具类

    目录 1 Collections 1 1 排序操作 xff1a xff08 均为static方法 xff09 1 2 查找 替换 1 3 同步控制 1 4 返回不可变集合 1 Collections Collections 是一个操作 Se
  • Bash脚本:采用for循环重复执行某条指令100次

    1 新建一个脚本文件 直接vim for sh就可以 2 编辑脚本文件 bin bash for i 61 1 i lt 61 100 i 43 43 do test 想要重复执行的命令 xff09 done 3 将脚本文件变为可执行文件
  • Android.mk 和 CMakeLists.txt 的转换规则

    Android mk 和 CMakeLists txt 都是用来构建 Android 应用程序或库的工具 但是它们有不同的语法和规则 xff0c 所以将一个 Android mk 文件转换成一个 CMakeLists txt 文件需要一些注
  • EFI Shell 命令参考

    对于使用使用DOS的人来说 xff0c 会使用DOS命令是最基本的 xff0c 而在当今即将盛行的EFI BIOS来说 xff0c 就有了新的变化 xff0c 如何操作EFI Shell 呢 xff1f 至此我贴出了EFI Shell 的命
  • mysql出现提示错误10061的解决方法

    MySQL出现提示错误10061的解决方法 错误提示 xff1a 今天打开Navicat连接mysql突然提示 2003 Can t connect to MySQL server on localhost 10061 xff09 的错误提
  • 3分钟爬取全网10W+爆款,脚本无偿分享,零基础拿来直接就能用!

    市面上的新媒体资料都是过去时了 xff0c 只有最新的爆款文才是新媒体人的福音 xff01 三分钟爬取全网10W 43 爆款文 xff01 爬虫脚本无偿分享 xff0c 拿来就能直接用 xff0c 零基础也能用 xff01 需要的看图 xf
  • 使用Wake On Lan远程唤醒

    使用Wake On Lan远程唤醒 客厅里的那台htpc xff0c 在无下片任务的时候 xff0c 大部分时间里都在白白浪费电 主板是支持wake on lan的 xff0c 把它弄成可以远程控制会比较经济 首先要设置bios xff0c
  • .gitignore文件作用

    gitignore文件用于在将文件提交到git暂存区时 xff0c 指定将哪些文件排除 xff1b 1 gitignore文件基本用法 在 git文件所在的目录创建 gitignore 文件 文件内容如下 span class token
  • 《计算机应用基础》形考作业及答案

    国家开放大学 计算机应用基础 形考作业 及 答案 题目1 nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp 兔子bu蹬鹰 在Word 2010中编辑文本时 编辑
  • php操作redis代码

    lt php Redis缓存操作 64 author hxm 64 version 1 0 64 since 2015 05 04 class RCache extends Object implements CacheFace priva
  • C++实现归并排序

    C 43 43 实现归并排序 span class token comment span span class token comment main cpp span span class token comment MergeSort s
  • LinuxNote 第二章 新手必须掌握的Linux命令

    目录 第二章 新手必须掌握的Linux命令2 1 Shell2 2 命令格式及帮助命令 man2 2 1 命令格式2 2 2 帮助命令 man 2 3 常用的系统工作命令2 3 1 echo2 3 2 date2 3 3 reboot2 3
  • Linux PXE无盘工作站

    关于PXE无盘工作站系统的简介 PXE无盘工作站系统是指由一台或多台 系统服务器 和多台 PXE客户端 无盘工作站 通过 交换机 相连组成的局域网系统 xff08 图1 xff1a 无盘工作站系统部署拓扑图 xff09 系统服务器 xff1
  • 环形缓冲区的实现原理

    http blog chinaunix net uid 7491192 id 2051200 html 在通信程序中 xff0c 经常使用环形缓冲区作为数据结构来存放通信中发送和接收的数据 环形缓冲区是一个先进先出的循环缓冲区 xff0c
  • 计算任意二叉树T中其数据域大于等于x的结点个数并返回该值

    span class token macro property span class token directive keyword include span span class token string lt stdio h gt sp
  • 使用Mybatis这篇就够了

    第一章 框架概述 1 1 三层架构 界面层 xff1a 和用户打交道的 xff0c 接收用户的请求参数 xff0c 显示处理结果的 xff08 jsp xff0c html xff0c servlet xff09 业务逻辑层 xff1a 接
  • Web项目中访问路径问题

    访问路径问题 1 1访问路径的组成 URL xff0c 统一资源定位符 xff0c 用于定位资源的一种方式 通常的 URL 资源访问路径由两部分 构成 xff1a 资源路径与资源名称 资源名称指的是要访问资源的直接名称 xff0c 如 sh
  • 解决Navicat远程登录服务器的Mysql服务Password authentication failed

    常规用的是grant all privileges on to root 64 identified by zhaiwenhai 这里设置的密码 SSH用的是服务器的用户名和密码来进行验证
  • 一篇打通java路径问题

    访问路径问题 1 1访问路径的组成 URL xff0c 统一资源定位符 xff0c 用于定位资源的一种方式 通常的 URL 资源访问路径由两部分 构成 xff1a 资源路径与资源名称 资源名称指的是要访问资源的直接名称 xff0c 如 sh
  • ElasticSearch为索引库添加静态映射报:Failed to parse mapping [properties]: Root mapping definition has unsupport

    代码 span class token constant PUT span span class token operator span my index span class token punctuation span span cla