从存储在 HDFS 中的文档中提取数据以在 Elasticsearch 中建立索引

Extracting data from documents stored in HDFS to index in Elasticsearch

我有一个 HDFS 存档来存储各种文档,如 pdf、ms word 文件、ppt、csv 等。我想使用 elasticsearch 构建一个平台来搜索文件或文字内容。我知道我可以使用 es-hadoop 插件将数据从 HDFS 索引到 ES。我想知道从存储在 HDFS 中的文档中提取文本数据并为其编制索引的最佳方法。

如有任何帮助,我们将不胜感激。

您可以使用 Elasticsearch mapper attachments plugin. This plugin uses Apache Tika 来提取几乎所有已知类型的文档,并使其可由 Elasticsearch 搜索。 希望对您有所帮助。

我进行了大量搜索,这是我目前找到的方法列表。

这是 integrations/plugins 的整体页面: https://www.elastic.co/guide/en/elasticsearch/plugins/master/integrations.html

这是映射器附件的新替代品,Injest 插件: https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest-attachment.html 关于如何使用它的帖子:https://qbox.io/blog/index-attachments-files-elasticsearch-mapper 这是关于使用 Injest 与 fs-crawler 的优缺点的讨论(dadoonet 是 Elastic 开发人员): https://discuss.elastic.co/t/mapper-attachment-plugin-vs-pre-parsing-and-extracting-content-from-binary-files/73764/10

这里是文件系统爬虫(FS crawler)插件: https://github.com/dadoonet/fscrawler

这是 Ambar 文档搜索系统 - 他们有一个开源社区 github: https://ambar.cloud/ https://github.com/RD17/ambar https://blog.ambar.cloud/ingesting-documents-pdf-word-txt-etc-into-elasticsearch/ 他们似乎使用两种数据库服务器类型(MongoDB 和 Redis),还不确定为什么。

这是 Injest 和 Ambar 都使用的 Apache Tika(它还通过使用 Tesseract 提供了 OCR,我听说 Injest 不支持它): http://tika.apache.org/1.16/

此外,在 Injest 对 Tika 的使用中,仅支持一部分文件类型: https://discuss.elastic.co/t/full-list-of-supported-document-formats-by-es/81149

我希望以上内容可以节省其他开发人员的时间,如果人们发现更多,他们会在下面发表评论。

谢谢!