1
我在关注此tutorial。在ElasticSearch中创建附件类型映射时的NoSuchMethodError
我开始安装attachment-mapper(用最新版本替换它们的链接)。
bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/2.4.1
开始新建,删除 “测试” 的索引,然后创建新的:
curl -X DELETE "localhost:9200/test"
创建指标,我相信:
curl -X PUT "localhost:9200/test" -d '{
"settings" : { "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 }}
}'
然后我尝试创建映射:
curl -X PUT "localhost:9200/test/attachment/_mapping" -d '{
"attachment" : {
"properties" : {
"file" : {
"type" : "attachment",
"fields" : {
"title" : { "store" : "yes" },
"file" : { "term_vector":"with_positions_offsets", "store":"yes" }
}
}
}
}
}'
然后我得到这个错误:
{
"error" : "NoSuchMethodError[org.elasticsearch.index.mapper.core.TypeParsers.parseMultiField(Lorg/elasticsearch/index/mapper/core/AbstractFieldMapper$Builder;Ljava/lang/String;Lorg/elasticsearch/index/mapper/Mapper$TypeParser$ParserContext;Ljava/lang/String;Ljava/lang/Object;)V]",
"status" : 500
}
任何想法是怎么回事?
它可能是与attachment-mapper插件安装有关的问题吗?
attachment-mapper使用Tika。我安装了Tika,也许安装错了?我如何检查?
任何洞察将有所帮助。