Skip to content

Commit 4ccd485

Browse files
authored
Minor cleanup in Pipelines doc
1 parent 363eec4 commit 4ccd485

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/Pipelines.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to transform incoming data in an Elasticsearch Ingest Pip
44

55
# Ingest Pipelines
66

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.
88

99

1010
## 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
1313

1414
```js
1515
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+
} );
2929
```
3030

3131
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
6767

6868
```js
6969
var pipeline = getInstance( "Pipeline@cbElasticsearch" )
70-
.new( getInstance( "Client@cbElasticsearch" )
71-
.getPipeline( "foo-pipeline" ) );
70+
.new( getInstance( "Client@cbElasticsearch" )
71+
.getPipeline( "foo-pipeline" ) );
7272

7373
pipeline.addProcessor(
7474
{
@@ -107,4 +107,4 @@ For multiple documents, the pipeline may be set in the document, prior to the `s
107107
```js
108108
getInstance( "Client@cbElasticsearch" )
109109
.saveAll( documents=myDocuments, params={ "pipeline" : "foo-pipeline" } );
110-
```
110+
```

0 commit comments

Comments
 (0)