1 在数据导入的文件运行时,出现

'analyzer [ik_smart] not found for field ["在吃饭"]')

"analyzer": "ik_smart",
        "search_analyzer": "ik_smart",

这个错误.这个错误是因为elasticsearch没有安装ik分词插件

 

2 在docker中安装ik插件 ,docker重启加载失败,抛出异常

找了网上很多资料,有让删除文件的,但是我在他说的目录下没有找到那个文件,有让下载东西的,看太多忘了是什么了,对于我的问题是没有用的,后来发现github上让把ik包放在自己创建的ik文件夹里然后在放在plugs文件夹下,然后照做了之后,还不对,后来又重新下载了两次包才可以,可能是因为包下载的是坏包,(网不好)

 

3 在数据导入的文件运行时,出现

elasticsearch.exceptions.RequestError: RequestError(400, 'mapper_parsing_exception', 'Failed to parse mapping [all_rule]: Could not convert [id.index] to boolean') 

原因是,在6.5.1中.分词已经不需要写not_analyzed了,把type改成keyword就行

 

4 这个错误改正完之后,又报了一个错误,

raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: RequestError(400, 'illegal_argument_exception', 'Rejecting mapping update to [mlt_dq_index] as the final mapping would have more than 1 type: [all_rule, falu_rule, shishi_rule]')
release@dc103:~/

这个错误是因为在6.x之后一个索引只能有一个Type,而我写了三个,所以报错.

 

慢慢积累中......

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐