【发布时间】:2016-10-18 02:15:31
【问题描述】:
我是 Elasticsearch 的新手,我在 https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments.html 读到 mapper-attachments 插件在 elasticsearch 5.0.0 中已弃用。
我现在尝试使用新的摄取附件插件为 pdf 文件编制索引并上传附件。
到目前为止我尝试过的是
curl -H 'Content-Type: application/pdf' -XPOST localhost:9200/test/1 -d @/cygdrive/c/test/test.pdf
但我收到以下错误:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}},"status":400}
我希望 pdf 文件将被编入索引并上传。我做错了什么?
我还测试了 Elasticsearch 2.3.3,但 mapper-attachments 插件对此版本无效,我不想使用任何旧版本的 Elasticsearch。
【问题讨论】:
标签: pdf elasticsearch plugins attachment elasticsearch-plugin