1. Get Pipeline API

原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/5.3/get-pipeline-api.html

译文链接 : http://www.apache.wiki/display/Elasticsearch/Get+Pipeline+API

贡献者 : 那伊抹微笑ApacheCNApache中文网

get pipeline API 根据 ID 返回 pipelines(管道)。此 API 始终返回 pipeline 的本地引用。

curl -XGET 'localhost:9200/_ingest/pipeline/my-pipeline-id?pretty'

Example **response**(示例响应) :

{
  "my-pipeline-id" : {
    "description" : "describe pipeline",
    "processors" : [
      {
        "set" : {
          "field" : "foo",
          "value" : "bar"
        }
      }
    ]
  }
}

对于每个返回的 pipeline(管道),将返回 sourceversion(版本)。该版本对于知道节点具有哪个版本的 pipeline(管道)是有用的。您可以指定多个 IDs 以返回更多的 pipeline(管道)。也支持通配符。

Pipeline Versioning(管道版本)

pipelines(管道)可以根据情况添加一个 version number(版本号),它可以说任何的整数值,以简化 external**systems(外部系统)对 pipeline(管道)的管理。该 version**field(版本字段)完全是可选择的,并且仅用于外部管道的管理。要取消设置 version(版本),只需要简单的更换 pipeline(管道)即可。

curl -XPUT 'localhost:9200/_ingest/pipeline/my-pipeline-id?pretty' -H 'Content-Type: application/json' -d'
{
  "description" : "describe pipeline",
  "version" : 123,
  "processors" : [
    {
      "set" : {
        "field": "foo",
        "value": "bar"
      }
    }
  ]
}
'

要检查 version(版本),您可以使用 filter_pathfilter responses,以限制响应的 version(版本):

GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version

这样应该给予一个小小的 response(响应),使得它更容易且便于解析 :

{
  "my-pipeline-id" : {
    "version" : 123
  }
}
Copyright © Kilvn 2021. all right reserved,powered by Gitbook最后更新时间: 2021-06-08 20:22:42

results matching ""

    No results matching ""