From a75675444b161eaf358966d18ab345673cc1e2b6 Mon Sep 17 00:00:00 2001 From: owaiskazi19 Date: Mon, 29 Apr 2024 23:17:48 +0000 Subject: [PATCH 1/3] Updated documentation for using search pipeline for multiple indices Signed-off-by: owaiskazi19 --- .../search-pipelines/using-search-pipeline.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/_search-plugins/search-pipelines/using-search-pipeline.md b/_search-plugins/search-pipelines/using-search-pipeline.md index 882c94d99e..949c4f37c9 100644 --- a/_search-plugins/search-pipelines/using-search-pipeline.md +++ b/_search-plugins/search-pipelines/using-search-pipeline.md @@ -130,6 +130,53 @@ The response contains only the public document, indicating that the pipeline was ``` +You can also search on multiple indices having the same default pipeline. For example, below `alias1` has 2 indices `my_index1` and `my_index2` and both indices have same default pipeline `my_pipeline` attached to them.. + +```json +GET /alias1/_search +``` +{% include copy-curl.html %} + +The response contains only the public document, indicating that the pipeline was applied by default: + +
+ + Response + + {: .text-delta} + +```json +{ + "took": 59, + "timed_out": false, + "_shards": { + "total": 2, + "successful": 2, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 1, + "relation": "eq" + }, + "max_score": 0.0, + "hits": [ + { + "_index": "my_index1", + "_id": "1", + "_score": 0.0, + "_source": { + "message": "This is a public message", + "visibility": "public" + } + } + ] + } +} +``` +
+ ### Disabling the default pipeline for a request If you want to run a search request without applying the default pipeline, you can set the `search_pipeline` query parameter to `_none`: From dde8ffeecc22154ab0ffaa96ff0b3545b4902247 Mon Sep 17 00:00:00 2001 From: Melissa Vagi Date: Tue, 7 May 2024 15:41:40 -0600 Subject: [PATCH 2/3] Doc review complete with edits for clarity Signed-off-by: Melissa Vagi --- _search-plugins/search-pipelines/using-search-pipeline.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_search-plugins/search-pipelines/using-search-pipeline.md b/_search-plugins/search-pipelines/using-search-pipeline.md index 949c4f37c9..755d6e9975 100644 --- a/_search-plugins/search-pipelines/using-search-pipeline.md +++ b/_search-plugins/search-pipelines/using-search-pipeline.md @@ -130,14 +130,14 @@ The response contains only the public document, indicating that the pipeline was ``` -You can also search on multiple indices having the same default pipeline. For example, below `alias1` has 2 indices `my_index1` and `my_index2` and both indices have same default pipeline `my_pipeline` attached to them.. +You can search across multiple indexes that share the same default pipeline. For example, `alias1` has two indexes, `my_index1` and `my_index2`, both of which have the default pipeline `my_pipeline` attached to them. ```json GET /alias1/_search ``` {% include copy-curl.html %} -The response contains only the public document, indicating that the pipeline was applied by default: +The response includes only the public version of the document, confirming that the default pipeline was successfully applied:
From 59242a9e5e9e8b0ea65c241b0d117e246be0f31f Mon Sep 17 00:00:00 2001 From: Melissa Vagi Date: Wed, 8 May 2024 10:08:23 -0600 Subject: [PATCH 3/3] Update using-search-pipeline.md Signed-off-by: Melissa Vagi Signed-off-by: Melissa Vagi --- _search-plugins/search-pipelines/using-search-pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_search-plugins/search-pipelines/using-search-pipeline.md b/_search-plugins/search-pipelines/using-search-pipeline.md index 755d6e9975..ecb988ad11 100644 --- a/_search-plugins/search-pipelines/using-search-pipeline.md +++ b/_search-plugins/search-pipelines/using-search-pipeline.md @@ -130,7 +130,7 @@ The response contains only the public document, indicating that the pipeline was ```
-You can search across multiple indexes that share the same default pipeline. For example, `alias1` has two indexes, `my_index1` and `my_index2`, both of which have the default pipeline `my_pipeline` attached to them. +You can search across multiple indexes that share the same default pipeline. For example, `alias1` has two indexes, `my_index1` and `my_index2`, both of which have the default pipeline `my_pipeline` attached to them: ```json GET /alias1/_search