es-Ingest pipelines

本文详细介绍了Elasticsearch的Ingest Pipelines,包括其作为数据预处理工具的角色,官方文档链接,使用pipeline的必要条件,pipeline的组成和使用步骤。还列举了常用的处理器,如Append、Foreach、uppercase、Lowercase等,用于数据转换和预处理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Ingest pipelines

node为ingest角色,对indexing request做预处理,主要用于数据转换为合规、期望值的场景

官方地址:

https://www.elastic.co/guide/en/elasticsearch/reference/7.13/ingest.html#ingest

使用pipeline必要条件

node角色必须为:ingest

pipeline的组成

{
   
   
  "description" : "...",
  "processors" : [ ... ]
}

description:描述
processor: pipeline中的每个处理单元,pipeline的能力都由processor来提供
pipeline: es对indexing的doc做一些预处理的程序,pipeline可定义了很多个processor单元

pipeline的使用

1.创建pipeline

PUT _ingest/pipeline/my-pipeline
{
   
   
  "description": "My optional pipeline description",
  "processors": [
    {
   
   
      "set": {
   
   
        "description": "My optional processor description",
        "field": "my-long-field",
        "value": 10
      }
    },
    {
   
   
      "lowercase": {
   
   
        "field": "my-keyword-field"
      }
    }
  ]
}

2.测试pipeline

对_source进行小写

POST _ingest/pipeline
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值