当前位置:   article > 正文

es-Ingest pipelines_es pipeline

es pipeline

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" : [ ... ]
}
  • 1
  • 2
  • 3
  • 4
  • 5

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"
      }
    }
  ]
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

2.测试pipeline

对_source进行小写

POST _ingest/</
    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/887740
    推荐阅读
    相关标签
      

    闽ICP备14008679号