"reason":"No handler for type [attachment] declared on field [file]" 最完全解决方案
0、elasticsearch-mapper-attachments 2.3.4安装
mapper-attachments安装方法分两类,在线和离线:
- 在线安装
bin/elasticsearch-plugin install mapper-attachments
- 离线安装
bin/elasticsearch-plugin install file:///path/to/mapper-attachments-2.3.4.zip
插件下载地址见:ES插件elasticsearch-mapper-attachments 2.3.4及各个版本正确下载地址
1、插入attachment mapping时,报错
报错详情:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [attachment] declared on field [file]"}],
"type":"mapper_parsing_exception","reason":"No handler for type [attachment] declared on field [file]"},"
status":400}
具体引起报错的指令:
curl -XPUT http://88.88.88.88:9200/test/person/_mapping -d '{
"person": {
"properties": {
"file": {
"type": "attachment",
"path": "full",
"fields": {
"file": {
"type": "string",
"term_vector":"with_positions_offsets",
"store": true
}}}}}}'
可以看到中间的attachment类别无法识别。
那么最完全解决方案是我总结如下:
- 是否重启ES
大部分插件在重启后,ES才会在初始化过程中加载plugins。
- 查看重启日志,查看是否存在mapper-attachments关键词
[node-es-xxxx-pub03] modules [reindex, lang-expression, lang-groovy], plugins [elasticsearch-analysis-ansj, mapper-attachments, kopf, analysis-ik], sites [elasticsearch-analysis-ansj, kopf]
可以看到,该插件是正常加载的。
- curl查看节点plugins信息,查看插件是否安装正确
[xxxx@hostname estest]$ curl -XGET 88.88.88.88:/_cat/plugins?v
name component version type url
node-es-xxx-pub01 analysis-ik 1.9. j
node-es-xxx-pub01 gui 2.0. s /_plugin/gui/
node-es-xxx-pub01 kopf 2.0. s /_plugin/kopf/
node-es-xxx-pub01 mapper-attachments 2.3. j
……
……
可以看到,我们的插件是安装正确的。
- 是否是集群?集群需要集群重启(还有一种可能是master节点必须重启)
集群所有节点都重启有可能不需要,时间紧张我也没时间去测了,反正我都重启了一遍。
这里我觉得只需要对master节点重启。因为如果调用es集群中的slave节点的es服务,对应它也会转到master节点来处理任务,毕竟只有master节点的log在刷新。
----------------------------------------------------------------------
至此,问题解决,重启了集群
"reason":"No handler for type [attachment] declared on field [file]" 最完全解决方案的更多相关文章
- No handler for type [text] declared on field [content]
Install 1.compile checkout ik version respective to your elasticsearch version git checkout tags/{ve ...
- [神经网络与深度学习][计算机视觉]SSD编译时遇到了json_parser_read.hpp:257:264: error: ‘type name’ declared as function ret
运行make之后出现如下错误: /usr/include/boost/property_tree/detail/json_parser_read.hpp:257:264: error: 'type n ...
- 【Junit】The import org.junit.Test conflicts with a type defined in the same file报错
引入Junit后,进行单元测试,莫名其妙报了个这样的错误 The import org.junit.Test conflicts with a type defined in the same fil ...
- AIDL interface XXX should be declared in a file
在写AIDL的时候出现了interface XXX should be declared in a file, 错误...经过反复查看,发现AIDL规定,文件名必须和interface XXX名字相同 ...
- react.js Warning: Failed form propType: You provided a value prop to a form field without an onChange handler. This will render a read-only field.
错误信息: eact.js:20483 Warning: Failed form propType: You provided a value prop to a form field without ...
- 手机端input[type=date]的时候placeholder不起作用解决方案
目前PC端对input 的date类型支持不好,我试下来的结果是只有chrome支持.firefox.IE11 都不支持.而且PC端有很多日历控件可供使用.就不去多考虑这点了. 那么在移动端的话,io ...
- 利用传入的Type类型来调用范型方法的解决方案
起因:自定义一个GridView控件,其数据源来源于一个通用方法Get<T>(),根据你传入的T到数据库中得到相应的数据,问题是定义GridView控件时没法在界面端设置使用泛型,只能在每 ...
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...
- 怎么在eclipse中查到这个类用的是哪个jar的类和Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
找到了一个办法,你先按F3,然后点击Change Attached Source..按钮,在弹出的框里有个路径,我的路径是D:/SNFWorkSpace/JAR/~importu9.jar,然后你去引 ...
随机推荐
- Linux回环接口-----(loop-back/loopback)
回环接口(loop-back/loopback) Moakap整理 Loopback接口是一个虚拟网络接口,在不同的领域,其含义也大不一样. 1. TCP/IP协议栈中的loopback接口 在TCP ...
- vue vm.$attrs 使用
1.vm.$attrs 说明 https://cn.vuejs.org/v2/api/#vm-attrs 将父组件的属性(除去在props中传入的属性)传递给子组件. 2.代码分析 以下是elemen ...
- 模式的秘密-代理模式(2)-JDK动态代理
代理模式-动态代理 (1) (2) 代码实践动态代理: 第一步:被代理类的接口: package com.JdkProxy; public interface Moveable { void move ...
- Ldap登陆AD(Active Directory)进行认证的Java示例
原文地址:http://hi.baidu.com/js2007/item/24efbb0fae1c9b90a3df432a package LdapTest; import java.util.Has ...
- OFBiz:添加实体栏位
如何添加实体栏位?这里演示为PostalAddress添加planet栏位.打开applications/party/entitydef/entitymodel.xml,找到PostalAddress ...
- Android设计模式系列(3)--SDK源码之单例模式
单例模式,可以说是GOF的23种设计模式中最简单的一个.这个模式相对于其他几个模式比较独立,它只负责控制自己的实例化数量单一(而不是考虑为用户产生什么样的实例),很有意思,是一个感觉上很干净的模式,本 ...
- C#:将数据网格内的数据导出到Excel
public void ExportDataToExecel(DataGridView dataGridView1) { SaveFileDialog kk = new SaveFileDialog( ...
- Android 使用Scroller实现绚丽的ListView左右滑动删除Item效果
转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17539199),请尊重他人的辛勤劳动成果,谢谢! 我在上一 ...
- 用Jedis操作redis示例一,Key,value HashMap
简单的key,value形式 public class RedisDemo { public static void main(String[] args) { Jedis jedis = new J ...
- 用string存取二进制数据
STL的string很强大,用起来也感觉很舒服,这段时间在代码中涉及到了用string存取二进制数据的问题,这里记录一下,以供以后参考. 首先提一下STL中string的参考资料:http://www ...