如何禁用base64存储ingest-attachment elasticsearch插件?

时间:2017-09-28 09:22:35

标签: elasticsearch indexing full-text-search full-text-indexing data-ingestion

signal-safety(7)显示了如何通过ingest-attachment插件将base64文档存储到elasticsearch中的示例。但在此之后,我得到的elasticsearch索引包含已解析的文本和base64字段源。为什么需要?有没有办法删除base64文本字段,只保留文档索引后的文本而不是内容?

1 个答案:

答案 0 :(得分:0)

没有选择,但是您可以在摄取管道中添加“删除”处理器:

PUT _ingest/pipeline/attachment
{
    "description": "Extract attachment information and remove the source encoded data",
    "processors": [
        {
            "attachment": {
                "field": "data",
                "properties": [
                    "content",
                    "content_type",
                    "content_length"
                ]
            }
        },
        {
            "remove": {
                "field": "data"
            }
        }
    ]
}