企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# Ingest Node(预处理节点) 原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/ingest.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/ingest.html) 译文链接 : [http://www.apache.wiki/display/Elasticsearch/Ingest+Node](http://www.apache.wiki/display/Elasticsearch/Ingest+Node) 贡献者 : [那伊抹微笑](/display/~wangyangting),[ApacheCN](/display/~apachecn),[Apache中文网](/display/~apachechina) 您可以在实际的 **indexing**(索引)发生之前使用 **ingest** **node** 来预处理 **documents**(文档)。这种预处理发生在 **intercepts** **bulk**(拦取批量索引)和 **index requests**(索引请求)的 **ingest** **node** 上,应用 **transformations**(转换),然后将文档传回 **index**(索引)或者 **bulk** **APIs**。 您可以在任何节点上启用 **ingest**,甚至使用专门的 **ingest nodes**。默认情况下在所有的节点上启用 **ingest**。为了在某个节点上禁用 **ingest**,在 **elasticsearch.xml** 文件中配置如下设置 :  ``` node.ingest: false ``` 为了在 **indexing**(索引)之前预处理 **documents**(文档)。您可以定义一个指定了一系列的 **processors**(处理器)的 **pipeline**(管道)。每个 **processors**(处理器)以某种方式转换文档。例如,您可能有一个 **pipeline**(管道),其中包含一个 **processor**,该 **processor** 从文档中删除一个 **field**(字段),然后接着一个用于重命名 **field**(字段)的 **processor**(处理器)。 为了使用 **pipeline**(管道),您只需在 **index**(索引)或 **bulk** **request**(批量请求)时指定 **pipeline**(管道)参数,即可告知 **ingest** **node** 要使用哪一个 **pipeline**(管道)。例如 :  ``` curl -XPUT 'localhost:9200/my-index/my-type/my-id?pipeline=my_pipeline_id&pretty' -H 'Content-Type: application/json' -d' { "foo": "bar" } ' ```