相关疑难解决方法(0)

如何使用ingest-attachment插件索引Elasticsearch 5.0.0中的pdf文件?

我是Elasticsearch的新手,我在这里阅读https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments.html,在elasticsearch 5.0.0中不推荐使用mapper-attachments插件.

我现在尝试使用新的ingest-attachment插件索引pdf文件并上传附件.

到目前为止我尝试过的是

curl -H 'Content-Type: application/pdf' -XPOST localhost:9200/test/1 -d @/cygdrive/c/test/test.pdf
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误:

{"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}
Run Code Online (Sandbox Code Playgroud)

我希望pdf文件将被编入索引并上传.我究竟做错了什么?

我还测试了Elasticsearch 2.3.3,但mapper-attachments插件对此版本无效,我不想使用任何旧版本的Elasticsearch.

pdf plugins attachment elasticsearch elasticsearch-plugin

14
推荐指数
1
解决办法
2万
查看次数