From 1522c293f5631b7e3d187adc4b4d96f4d8e36fde Mon Sep 17 00:00:00 2001 From: Mike Barretta Date: Tue, 4 Jan 2022 15:44:08 -0500 Subject: [PATCH 1/4] Update ingest.asciidoc Adding text to clarify that the default pipeline only applies to index requests vs updates --- docs/reference/ingest.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ingest.asciidoc b/docs/reference/ingest.asciidoc index f44cb17c22519..608be96e9b725 100644 --- a/docs/reference/ingest.asciidoc +++ b/docs/reference/ingest.asciidoc @@ -264,7 +264,7 @@ POST _reindex === Set a default pipeline Use the <> index setting to set -a default pipeline. {es} applies this pipeline if no `pipeline` parameter +a default pipeline. {es} applies this pipeline to <> if no `pipeline` parameter is specified. [discrete] From 36e0286dcb9762023925d7b041ea517cddda3acb Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Thu, 6 Jan 2022 13:11:26 -0500 Subject: [PATCH 2/4] [DOCS] Note document updates don't apply ingest pipelines --- docs/reference/index-modules.asciidoc | 8 ++++++-- docs/reference/ingest.asciidoc | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/reference/index-modules.asciidoc b/docs/reference/index-modules.asciidoc index 07a90392f6847..7535ee36c6ddd 100644 --- a/docs/reference/index-modules.asciidoc +++ b/docs/reference/index-modules.asciidoc @@ -316,7 +316,9 @@ Defaults to `*`, which matches all fields eligible for Default <> for the index. Index requests will fail if the default pipeline is set and the pipeline does not exist. The default may be overridden using the `pipeline` parameter. The special pipeline name `_none` indicates - no ingest pipeline should be run. + no ingest pipeline should be run. This pipeline doesn't apply to document + updates made using the <> or the <>'s `update` action. [[index-final-pipeline]] `index.final_pipeline`:: @@ -324,7 +326,9 @@ Final <> for the index. Indexing requests will fail if the final pipeline is set and the pipeline does not exist. The final pipeline always runs after the request pipeline (if specified) and the default pipeline (if it exists). The special pipeline name `_none` -indicates no ingest pipeline will run. +indicates no ingest pipeline will run. This pipeline doesn't apply to document +updates made using the <> or the <>'s `update` action. + NOTE: You can't use a final pipeline to change the `_index` field. If the pipeline attempts to change the `_index` field, the indexing request will fail. diff --git a/docs/reference/ingest.asciidoc b/docs/reference/ingest.asciidoc index 608be96e9b725..816af2d011c7c 100644 --- a/docs/reference/ingest.asciidoc +++ b/docs/reference/ingest.asciidoc @@ -217,7 +217,7 @@ The API returns transformed documents: [[add-pipeline-to-indexing-request]] === Add a pipeline to an indexing request -Use the `pipeline` query parameter to apply a pipeline to documents in +Use the `pipeline` parameter to apply a pipeline to documents in <> or <> indexing requests. [source,console] @@ -231,7 +231,7 @@ POST my-data-stream/_doc?pipeline=my-pipeline PUT my-data-stream/_bulk?pipeline=my-pipeline { "create":{ } } { "@timestamp": "2099-03-07T11:04:06.000Z", "my-keyword-field": "foo" } -{ "create":{ } } +{ "create":{ "pipeline": "my-other-pipeline" } } { "@timestamp": "2099-03-07T11:04:07.000Z", "my-keyword-field": "bar" } ---- // TEST[setup:my_data_stream] @@ -259,12 +259,15 @@ POST _reindex // TEST[setup:my_data_stream] // TEST[teardown:data_stream_cleanup] +{es} doesn't apply pipelines to other document updates, such as those made using +the <> or the <>'s `update` action. + [discrete] [[set-default-pipeline]] === Set a default pipeline Use the <> index setting to set -a default pipeline. {es} applies this pipeline to <> if no `pipeline` parameter +a default pipeline. {es} applies this pipeline if no `pipeline` parameter is specified. [discrete] From 19c93d39ceeecc8d08953d12164225af7363a507 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Thu, 6 Jan 2022 16:16:08 -0500 Subject: [PATCH 3/4] Revert "[DOCS] Note document updates don't apply ingest pipelines" This reverts commit 36e0286dcb9762023925d7b041ea517cddda3acb. --- docs/reference/index-modules.asciidoc | 8 ++------ docs/reference/ingest.asciidoc | 9 +++------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docs/reference/index-modules.asciidoc b/docs/reference/index-modules.asciidoc index 7535ee36c6ddd..07a90392f6847 100644 --- a/docs/reference/index-modules.asciidoc +++ b/docs/reference/index-modules.asciidoc @@ -316,9 +316,7 @@ Defaults to `*`, which matches all fields eligible for Default <> for the index. Index requests will fail if the default pipeline is set and the pipeline does not exist. The default may be overridden using the `pipeline` parameter. The special pipeline name `_none` indicates - no ingest pipeline should be run. This pipeline doesn't apply to document - updates made using the <> or the <>'s `update` action. + no ingest pipeline should be run. [[index-final-pipeline]] `index.final_pipeline`:: @@ -326,9 +324,7 @@ Final <> for the index. Indexing requests will fail if the final pipeline is set and the pipeline does not exist. The final pipeline always runs after the request pipeline (if specified) and the default pipeline (if it exists). The special pipeline name `_none` -indicates no ingest pipeline will run. This pipeline doesn't apply to document -updates made using the <> or the <>'s `update` action. +indicates no ingest pipeline will run. + NOTE: You can't use a final pipeline to change the `_index` field. If the pipeline attempts to change the `_index` field, the indexing request will fail. diff --git a/docs/reference/ingest.asciidoc b/docs/reference/ingest.asciidoc index 816af2d011c7c..608be96e9b725 100644 --- a/docs/reference/ingest.asciidoc +++ b/docs/reference/ingest.asciidoc @@ -217,7 +217,7 @@ The API returns transformed documents: [[add-pipeline-to-indexing-request]] === Add a pipeline to an indexing request -Use the `pipeline` parameter to apply a pipeline to documents in +Use the `pipeline` query parameter to apply a pipeline to documents in <> or <> indexing requests. [source,console] @@ -231,7 +231,7 @@ POST my-data-stream/_doc?pipeline=my-pipeline PUT my-data-stream/_bulk?pipeline=my-pipeline { "create":{ } } { "@timestamp": "2099-03-07T11:04:06.000Z", "my-keyword-field": "foo" } -{ "create":{ "pipeline": "my-other-pipeline" } } +{ "create":{ } } { "@timestamp": "2099-03-07T11:04:07.000Z", "my-keyword-field": "bar" } ---- // TEST[setup:my_data_stream] @@ -259,15 +259,12 @@ POST _reindex // TEST[setup:my_data_stream] // TEST[teardown:data_stream_cleanup] -{es} doesn't apply pipelines to other document updates, such as those made using -the <> or the <>'s `update` action. - [discrete] [[set-default-pipeline]] === Set a default pipeline Use the <> index setting to set -a default pipeline. {es} applies this pipeline if no `pipeline` parameter +a default pipeline. {es} applies this pipeline to <> if no `pipeline` parameter is specified. [discrete] From 2b5efa61cbdeaea8ca71016ec720321e44b1b5ba Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Thu, 6 Jan 2022 16:17:16 -0500 Subject: [PATCH 4/4] reword --- docs/reference/ingest.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/ingest.asciidoc b/docs/reference/ingest.asciidoc index 608be96e9b725..9cd7b4cd19b8a 100644 --- a/docs/reference/ingest.asciidoc +++ b/docs/reference/ingest.asciidoc @@ -264,8 +264,8 @@ POST _reindex === Set a default pipeline Use the <> index setting to set -a default pipeline. {es} applies this pipeline to <> if no `pipeline` parameter -is specified. +a default pipeline. {es} applies this pipeline to indexing requests if no +`pipeline` parameter is specified. [discrete] [[set-final-pipeline]]