You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/Pipelines.md
+17-17
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to transform incoming data in an Elasticsearch Ingest Pip
4
4
5
5
# Ingest Pipelines
6
6
7
-
Elasticsearch allows you to create pipelines which pre-process inbound documents and data. Methods are available to create, read, update and delete pipelines. For more information on defining processors, conditionals and options see the (PUT Pipeline)[https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html] and (Processor)[https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest-processors.html] documentation.
7
+
Elasticsearch allows you to create pipelines which pre-process inbound documents and data. Methods are available to create, read, update and delete pipelines. For more information on defining processors, conditionals and options see the [PUT Pipeline](https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html) and [Processor](https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest-processors.html) documentation.
8
8
9
9
10
10
## Creating a Pipeline
@@ -13,19 +13,19 @@ Let's say we want to automatically set a field on a document when we save it. We
13
13
14
14
```js
15
15
var myPipeline =getInstance( "Pipeline@cbelasticsearch" ).new( {
16
-
"id":"foo-pipeline",
17
-
"description":"A test pipeline",
18
-
"version":1,
19
-
"processors": [
20
-
{
21
-
"set": {
22
-
"if":"ctx.foo == null",
23
-
"field":"foo",
24
-
"value":"bar"
25
-
}
26
-
}
27
-
]
28
-
} );
16
+
"id":"foo-pipeline",
17
+
"description":"A test pipeline",
18
+
"version":1,
19
+
"processors": [
20
+
{
21
+
"set": {
22
+
"if":"ctx.foo == null",
23
+
"field":"foo",
24
+
"value":"bar"
25
+
}
26
+
}
27
+
]
28
+
} );
29
29
```
30
30
31
31
With this pipeline, if a value of `foo` is not defined ( note that `ctx` is the document reference in the `if` conditional ) in the inbound document, then the value of that field will automatically be set to `'bar'`.
@@ -67,8 +67,8 @@ We can modify pipelines using the pipeline object, as well. Let's do this by ret
67
67
68
68
```js
69
69
var pipeline =getInstance( "Pipeline@cbElasticsearch" )
70
-
.new( getInstance( "Client@cbElasticsearch" )
71
-
.getPipeline( "foo-pipeline" ) );
70
+
.new( getInstance( "Client@cbElasticsearch" )
71
+
.getPipeline( "foo-pipeline" ) );
72
72
73
73
pipeline.addProcessor(
74
74
{
@@ -107,4 +107,4 @@ For multiple documents, the pipeline may be set in the document, prior to the `s
0 commit comments