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,也許安裝錯了?我如何檢查?
任何洞察將有所幫助。