summaryrefslogtreecommitdiff
path: root/docs/reference/ingest.asciidoc
blob: 7150bd32739c1c388dc411ac6a919c4df1a0c6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[[ingest]]
= Ingest Node

[partintro]
--
You can use ingest node to pre-process documents before the actual indexing takes place.
This pre-processing happens by an ingest node that intercepts bulk and index requests, applies the
transformations, and then passes the documents back to the index or bulk APIs.

You can enable ingest on any node or even have dedicated ingest nodes. Ingest is enabled by default
on all nodes. To disable ingest on a node, configure the following setting in the `elasticsearch.yml` file:

[source,yaml]
--------------------------------------------------
node.ingest: false
--------------------------------------------------

To pre-process documents before indexing, you <<pipeline,define a pipeline>> that specifies
a series of <<ingest-processors,processors>>. Each processor transforms the document in some way.
For example, you may have a pipeline that consists of one processor that removes a field from
the document followed by another processor that renames a field.

To use a pipeline, you simply specify the `pipeline` parameter on an index or bulk request to
tell the ingest node which pipeline to use. For example:

[source,js]
--------------------------------------------------
PUT my-index/my-type/my-id?pipeline=my_pipeline_id
{
  "foo": "bar"
}
--------------------------------------------------
// CONSOLE
// TEST[catch:request]

See <<ingest-apis,Ingest APIs>> for more information about creating, adding, and deleting pipelines.

--

include::ingest/ingest-node.asciidoc[]