org.elasticsearch.index.mapper.MapperParsingException: analyzer [ik_max_word] not found for field [t

最新推荐文章于 2022-10-12 15:58:32 发布
于 2020-11-20 20:20:41 发布

1、问题:
运行 springboot 项目,idea 控制台报错:
elasticsearch 创建索引时遇到 analyzer [ik_max_word] not found for field [name] ;

2020-11-20 20:01:00.993 ERROR 2242 — [ restartedMain] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.index.mapper.MapperParsingException: analyzer [ik_max_word] not found for field [title]

2、原因
IK分词器插件 未安装;

未安装原因:mac brew 安装的 elasticsearch 版本只有两个选择,为适应项目版本,于是安装了 elasticsearch 6.8.13 ,才发现,这个版本没有 ik 分词器。☹️

源文转自:
解决办法

org.elasticsearch.index.mapper.MapperParsingException: analyzer [ik_max_word] not found for field [t 1、问题:运行 springboot 项目,idea 控制台报错:elasticsearch 创建索引时遇到 analyzer [ik_max_word] not found for field [name] ;2020-11-20 20:01:00.993 ERROR 2242 --- [ restartedMain] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasti
更新ES属性异常,{} org . elasticsearch . index . mapper . Mapper Parsing Exception : object mapping for [attribute] tried to parse field [null] as object, but found a concrete value at org . elasticsearch . index . mapper .DocumentParser.parseObject(DocumentParser.java:218) at o..
原因就像mysql的字段要跟Java基本类型对应一样,ES的字段也要与Java的基本类型相对应。 而且这个最好新建一个ES索引库,否则可能会有问题。我用Restful操作初始化了一个ES索引库,并增加数据,再用Java操作的时候,Springboot启动会报错。 还有就是实体类的Document注解 index Name、Type都要有 需要检索的字段@ Field ( index =true),并且设置type = Field Type.Text。 package com.wheatdr.search.po
(1)No handler for type [string] declared on field {"reason":"Failed to parse mapping [umc_synclog_data]: No handler for type [string] declared on field [response]", "caused_by":{"reason":"No handl...
报错日志:网上写 elasticsearch 也有很多文章,都写的挺好的,目前想把错误日志以及解决方法写出来,希望一些小伙伴能尽快躲开些问题,把时间花在一些有用的事情上。 "error": { "root_cause": [ "type": " mapper _ parsing _ exception ", "reason": " analyzer on field [ word ] must be ...
错误翻译: mapper _ parsing _ exception :映射解析异常 Root mapping definition has unsupported parameters :根映射定义包含不受支持的参数 错误映射语句: "test_0904": { "mappings": { "user": { "properties": { "birthday": { Elasticsearch Status Exception [ Elasticsearch exception [type= mapper _ parsing _ exception , reason=Failed to parse mapping [doc]: analyzer [ ik _ max _ word ] not found for field [description]] ]; nested: Elasticsearch Exception [ Elasticsearch exception [type=
Mapper Parsing Exception [failed to parse [auditDate]]; nested: NumberFormat Exception [For input string: "2017-07-12 08:49:33"]; at org . elasticsearch . index . mapper . Field Mapper .parse( Field Mapper .java:298)
按照官方文档操作,但是windows下有些不同,它不认识单引号‘,因此如果这样操作,就会报错: C:\Users\neusoft>curl localhost:9200/b1/b2/1 -d {"name":"fdafa"} {"error":" Mapper Parsing Exception [failed to parse]; nested: JsonParse Exception [Un
{"error":" Mapper Parsing Exception [failed to parse]; nested: JsonParse Exception [Un expected character (''' (code 39)): expected a valid value (number, String, arra y, object, 'true', 'false' or 'null'