From a0db13460b6f151444d700f9073727a2c5c089d3 Mon Sep 17 00:00:00 2001 From: Junwei Dai Date: Tue, 28 Jan 2025 11:36:01 -0800 Subject: [PATCH 1/7] Add verbose_pipeline documentation in using-search-pipeline.md Signed-off-by: Junwei Dai --- .../search-pipelines/using-search-pipeline.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) diff --git a/_search-plugins/search-pipelines/using-search-pipeline.md b/_search-plugins/search-pipelines/using-search-pipeline.md index b6dbbdc5d0..d6b2c19b92 100644 --- a/_search-plugins/search-pipelines/using-search-pipeline.md +++ b/_search-plugins/search-pipelines/using-search-pipeline.md @@ -14,6 +14,7 @@ You can use a search pipeline in the following ways: - [Specify an existing pipeline](#specifying-an-existing-search-pipeline-for-a-request) for a request. - [Use a temporary pipeline](#using-a-temporary-search-pipeline-for-a-request) for a request. - Set a [default pipeline](#default-search-pipeline) for all requests in an index. +- Debugging search pipeline with the [verbose pipeline](#debugging-search-pipeline) parameter. ## Specifying an existing search pipeline for a request @@ -236,3 +237,172 @@ PUT /my_index/_settings } ``` {% include copy-curl.html %} + +## Debugging search pipeline + +The `verbose_pipeline` parameter helps visualize and debug data flow across search pipeline processors. It aids troubleshooting, optimizing pipeline configurations, and ensuring transparency for search request and response transformations. + +The `verbose_pipeline` parameter provides a detailed view of how data is passed through and transformed by each processor in the search pipeline. This functionality is supported in all three ways of using a search pipeline: + +- [Specifying an existing pipeline for a request](#specifying-an-existing-search-pipeline-for-a-request). +- [Using a temporary pipeline for a request](#using-a-temporary-search-pipeline-for-a-request). +- [Setting a default pipeline for all requests in an index](#default-search-pipeline). + +To enable the `verbose_pipeline` feature, simply add `verbose_pipeline=true` as a query parameter in your search request. + +### Example request with verbose pipeline + +You can specify the `verbose_pipeline` parameter in the query to enable detailed debugging. The `verbose_pipeline` parameter works seamlessly across all search pipeline configurations: + +#### Default Search Pipeline + +To use `verbose_pipeline` with a default search pipeline, set the pipeline as the default in the index settings and include `verbose_pipeline=true` in the query: + +```json +PUT /my_index/_settings +{ + "index.search.default_pipeline": "my_pipeline" +} +``` +{% include copy-curl.html %} + +```json +GET /my_index/_search?verbose_pipeline=true +``` +{% include copy-curl.html %} + +#### Specified Search Pipeline by ID +To use verbose_pipeline with a specific search pipeline, specify the pipeline ID along with verbose_pipeline=true in the query: +```json +GET /my_index/_search?search_pipeline=my_pipeline&verbose_pipeline=true +``` +{% include copy-curl.html %} + +#### Temporary Search Pipeline +To use verbose_pipeline with a temporary search pipeline, define the pipeline directly in the request body and include verbose_pipeline=true in the query: +```json +POST /my_index/_search?verbose_pipeline=true +{ + "query": { + "match": { "text_field": "some search text" } + }, + "search_pipeline": { + "request_processors": [ + { + "filter_query": { + "query": { "term": { "visibility": "public" } } + } + } + ], + "response_processors": [ + { + "collapse": { + "field": "category" + } + } + ] + } +} +``` +{% include copy-curl.html %} +### Example response with verbose pipeline + +When the verbose_pipeline parameter is enabled, the response contains an additional `processor_results` field that details the transformations applied by each processor in the pipeline: + +
+ + Response + + {: .text-delta} + +```json +{ + "took": 40, + "timed_out": false, + "_shards": { + "total": 1, + "successful": 1, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 1, + "relation": "eq" + }, + "max_score": 0.0, + "hits": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.0, + "_source": { + "notification": "This is a public message", + "visibility": "public" + } + } + ] + }, + "processor_results": [ + { + "processor_name": "filter_query", + "tag": "tag1", + "duration_millis": 1094542, + "status": "success", + "input_data": { + "verbose_pipeline": true + }, + "output_data": { + "verbose_pipeline": true, + "query": { + "bool": { + "filter": [ + { + "term": { + "visibility": { + "boost": 1.0, + "value": "public" + } + } + } + ], + "adjust_pure_negative": true, + "boost": 1.0 + } + } + } + }, + { + "processor_name": "rename_field", + "duration_millis": 1336958, + "status": "success", + "input_data": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.0, + "_source": { + "message": "This is a public message", + "visibility": "public" + } + } + ], + "output_data": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.0, + "_source": { + "notification": "This is a public message", + "visibility": "public" + } + } + ] + } + ] +} +``` +
+ + + From 8b8d3a1434721188de351c91cbcc79dca050150e Mon Sep 17 00:00:00 2001 From: Junwei Dai Date: Tue, 28 Jan 2025 12:47:02 -0800 Subject: [PATCH 2/7] Revert "Add verbose_pipeline documentation in using-search-pipeline.md" and add new page This reverts commit 7dbeb06ba95af4ebe51c7377076fa9cd78335275. add another page for debugging search pipeline Signed-off-by: Junwei Dai --- .../debugging-search-pipeline.md | 175 ++++++++++++++++++ .../search-pipelines/using-search-pipeline.md | 170 ----------------- 2 files changed, 175 insertions(+), 170 deletions(-) create mode 100644 _search-plugins/search-pipelines/debugging-search-pipeline.md diff --git a/_search-plugins/search-pipelines/debugging-search-pipeline.md b/_search-plugins/search-pipelines/debugging-search-pipeline.md new file mode 100644 index 0000000000..d10d559df8 --- /dev/null +++ b/_search-plugins/search-pipelines/debugging-search-pipeline.md @@ -0,0 +1,175 @@ +--- +layout: default +title: Debugging a search pipeline +nav_order: 20 +has_children: false +parent: Search pipelines +grand_parent: Search +--- + + +# Debugging a search pipeline + +The `verbose_pipeline` parameter offers detailed insights into the flow and transformation of data through each processor in the search pipeline. It facilitates troubleshooting, pipeline optimization, and ensures transparency in the end-to-end handling of search requests and responses. This functionality is available for all three ways of using a search pipeline: + +- [Specifying an existing pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#specifying-an-existing-search-pipeline-for-a-request). + +- [Using a temporary pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#using-a-temporary-search-pipeline-for-a-request). + +- [Setting a default pipeline for all requests in an index]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/#using-search-pipeline/default-search-pipeline). + + To enable the `verbose_pipeline` feature, simply add `verbose_pipeline=true` as a query parameter in your search request. + +### Example request with verbose pipeline + +You can specify the `verbose_pipeline` parameter in the query to enable detailed debugging. The `verbose_pipeline` parameter works seamlessly across all search pipeline configurations: + +#### Default Search Pipeline + +To use `verbose_pipeline` with a default search pipeline, set the pipeline as the default in the index settings and include `verbose_pipeline=true` in the query: + +```json +PUT /my_index/_settings +{ + "index.search.default_pipeline": "my_pipeline" +} +``` +{% include copy-curl.html %} + +```json +GET /my_index/_search?verbose_pipeline=true +``` +{% include copy-curl.html %} + +#### Specified Search Pipeline by ID +To use `verbose_pipeline` with a specific search pipeline, specify the pipeline ID along with verbose_pipeline=true in the query: +```json +GET /my_index/_search?search_pipeline=my_pipeline&verbose_pipeline=true +``` +{% include copy-curl.html %} + +#### Temporary Search Pipeline +To use `verbose_pipeline` with a temporary search pipeline, define the pipeline directly in the request body and include verbose_pipeline=true in the query: +```json +POST /my_index/_search?verbose_pipeline=true +{ + "query": { + "match": { "text_field": "some search text" } + }, + "search_pipeline": { + "request_processors": [ + { + "filter_query": { + "query": { "term": { "visibility": "public" } } + } + } + ], + "response_processors": [ + { + "collapse": { + "field": "category" + } + } + ] + } +} +``` +{% include copy-curl.html %} +### Example response with verbose pipeline + +When the `verbose_pipeline` parameter is enabled, the response contains an additional `processor_results` field that details the transformations applied by each processor in the pipeline: + +
+ + Response + + {: .text-delta} + +```json +{ + "took": 40, + "timed_out": false, + "_shards": { + "total": 1, + "successful": 1, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 1, + "relation": "eq" + }, + "max_score": 0.0, + "hits": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.0, + "_source": { + "notification": "This is a public message", + "visibility": "public" + } + } + ] + }, + "processor_results": [ + { + "processor_name": "filter_query", + "tag": "tag1", + "duration_millis": 1094542, + "status": "success", + "input_data": { + "verbose_pipeline": true + }, + "output_data": { + "verbose_pipeline": true, + "query": { + "bool": { + "filter": [ + { + "term": { + "visibility": { + "boost": 1.0, + "value": "public" + } + } + } + ], + "adjust_pure_negative": true, + "boost": 1.0 + } + } + } + }, + { + "processor_name": "rename_field", + "duration_millis": 1336958, + "status": "success", + "input_data": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.0, + "_source": { + "message": "This is a public message", + "visibility": "public" + } + } + ], + "output_data": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.0, + "_source": { + "notification": "This is a public message", + "visibility": "public" + } + } + ] + } + ] +} +``` +
\ No newline at end of file diff --git a/_search-plugins/search-pipelines/using-search-pipeline.md b/_search-plugins/search-pipelines/using-search-pipeline.md index d6b2c19b92..b6dbbdc5d0 100644 --- a/_search-plugins/search-pipelines/using-search-pipeline.md +++ b/_search-plugins/search-pipelines/using-search-pipeline.md @@ -14,7 +14,6 @@ You can use a search pipeline in the following ways: - [Specify an existing pipeline](#specifying-an-existing-search-pipeline-for-a-request) for a request. - [Use a temporary pipeline](#using-a-temporary-search-pipeline-for-a-request) for a request. - Set a [default pipeline](#default-search-pipeline) for all requests in an index. -- Debugging search pipeline with the [verbose pipeline](#debugging-search-pipeline) parameter. ## Specifying an existing search pipeline for a request @@ -237,172 +236,3 @@ PUT /my_index/_settings } ``` {% include copy-curl.html %} - -## Debugging search pipeline - -The `verbose_pipeline` parameter helps visualize and debug data flow across search pipeline processors. It aids troubleshooting, optimizing pipeline configurations, and ensuring transparency for search request and response transformations. - -The `verbose_pipeline` parameter provides a detailed view of how data is passed through and transformed by each processor in the search pipeline. This functionality is supported in all three ways of using a search pipeline: - -- [Specifying an existing pipeline for a request](#specifying-an-existing-search-pipeline-for-a-request). -- [Using a temporary pipeline for a request](#using-a-temporary-search-pipeline-for-a-request). -- [Setting a default pipeline for all requests in an index](#default-search-pipeline). - -To enable the `verbose_pipeline` feature, simply add `verbose_pipeline=true` as a query parameter in your search request. - -### Example request with verbose pipeline - -You can specify the `verbose_pipeline` parameter in the query to enable detailed debugging. The `verbose_pipeline` parameter works seamlessly across all search pipeline configurations: - -#### Default Search Pipeline - -To use `verbose_pipeline` with a default search pipeline, set the pipeline as the default in the index settings and include `verbose_pipeline=true` in the query: - -```json -PUT /my_index/_settings -{ - "index.search.default_pipeline": "my_pipeline" -} -``` -{% include copy-curl.html %} - -```json -GET /my_index/_search?verbose_pipeline=true -``` -{% include copy-curl.html %} - -#### Specified Search Pipeline by ID -To use verbose_pipeline with a specific search pipeline, specify the pipeline ID along with verbose_pipeline=true in the query: -```json -GET /my_index/_search?search_pipeline=my_pipeline&verbose_pipeline=true -``` -{% include copy-curl.html %} - -#### Temporary Search Pipeline -To use verbose_pipeline with a temporary search pipeline, define the pipeline directly in the request body and include verbose_pipeline=true in the query: -```json -POST /my_index/_search?verbose_pipeline=true -{ - "query": { - "match": { "text_field": "some search text" } - }, - "search_pipeline": { - "request_processors": [ - { - "filter_query": { - "query": { "term": { "visibility": "public" } } - } - } - ], - "response_processors": [ - { - "collapse": { - "field": "category" - } - } - ] - } -} -``` -{% include copy-curl.html %} -### Example response with verbose pipeline - -When the verbose_pipeline parameter is enabled, the response contains an additional `processor_results` field that details the transformations applied by each processor in the pipeline: - -
- - Response - - {: .text-delta} - -```json -{ - "took": 40, - "timed_out": false, - "_shards": { - "total": 1, - "successful": 1, - "skipped": 0, - "failed": 0 - }, - "hits": { - "total": { - "value": 1, - "relation": "eq" - }, - "max_score": 0.0, - "hits": [ - { - "_index": "my_index", - "_id": "1", - "_score": 0.0, - "_source": { - "notification": "This is a public message", - "visibility": "public" - } - } - ] - }, - "processor_results": [ - { - "processor_name": "filter_query", - "tag": "tag1", - "duration_millis": 1094542, - "status": "success", - "input_data": { - "verbose_pipeline": true - }, - "output_data": { - "verbose_pipeline": true, - "query": { - "bool": { - "filter": [ - { - "term": { - "visibility": { - "boost": 1.0, - "value": "public" - } - } - } - ], - "adjust_pure_negative": true, - "boost": 1.0 - } - } - } - }, - { - "processor_name": "rename_field", - "duration_millis": 1336958, - "status": "success", - "input_data": [ - { - "_index": "my_index", - "_id": "1", - "_score": 0.0, - "_source": { - "message": "This is a public message", - "visibility": "public" - } - } - ], - "output_data": [ - { - "_index": "my_index", - "_id": "1", - "_score": 0.0, - "_source": { - "notification": "This is a public message", - "visibility": "public" - } - } - ] - } - ] -} -``` -
- - - From e409e49d85ca70d5fe3f87bac555761d76866aa4 Mon Sep 17 00:00:00 2001 From: Junwei Dai Date: Tue, 28 Jan 2025 13:24:25 -0800 Subject: [PATCH 3/7] fix error Signed-off-by: Junwei Dai --- _search-plugins/search-pipelines/debugging-search-pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_search-plugins/search-pipelines/debugging-search-pipeline.md b/_search-plugins/search-pipelines/debugging-search-pipeline.md index d10d559df8..2d8af64692 100644 --- a/_search-plugins/search-pipelines/debugging-search-pipeline.md +++ b/_search-plugins/search-pipelines/debugging-search-pipeline.md @@ -16,7 +16,7 @@ The `verbose_pipeline` parameter offers detailed insights into the flow and tran - [Using a temporary pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#using-a-temporary-search-pipeline-for-a-request). -- [Setting a default pipeline for all requests in an index]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/#using-search-pipeline/default-search-pipeline). +- [Setting a default pipeline for all requests in an index]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#default-search-pipeline). To enable the `verbose_pipeline` feature, simply add `verbose_pipeline=true` as a query parameter in your search request. From 8a87cfb0cfaf38d028b41d5791053c83faace311 Mon Sep 17 00:00:00 2001 From: Junwei Dai Date: Tue, 28 Jan 2025 13:57:36 -0800 Subject: [PATCH 4/7] change the dsiplay order Signed-off-by: Junwei Dai --- _search-plugins/search-pipelines/debugging-search-pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_search-plugins/search-pipelines/debugging-search-pipeline.md b/_search-plugins/search-pipelines/debugging-search-pipeline.md index 2d8af64692..eeefbd4832 100644 --- a/_search-plugins/search-pipelines/debugging-search-pipeline.md +++ b/_search-plugins/search-pipelines/debugging-search-pipeline.md @@ -1,7 +1,7 @@ --- layout: default title: Debugging a search pipeline -nav_order: 20 +nav_order: 25 has_children: false parent: Search pipelines grand_parent: Search From d808f1ec20a4554683eb351d9a8a54aee860d6ac Mon Sep 17 00:00:00 2001 From: Junwei Dai Date: Wed, 29 Jan 2025 09:26:24 -0800 Subject: [PATCH 5/7] edit doc based on comments Signed-off-by: Junwei Dai --- .../debugging-search-pipeline.md | 212 +++++++++++------- 1 file changed, 130 insertions(+), 82 deletions(-) diff --git a/_search-plugins/search-pipelines/debugging-search-pipeline.md b/_search-plugins/search-pipelines/debugging-search-pipeline.md index eeefbd4832..29c6a8603b 100644 --- a/_search-plugins/search-pipelines/debugging-search-pipeline.md +++ b/_search-plugins/search-pipelines/debugging-search-pipeline.md @@ -10,7 +10,7 @@ grand_parent: Search # Debugging a search pipeline -The `verbose_pipeline` parameter offers detailed insights into the flow and transformation of data through each processor in the search pipeline. It facilitates troubleshooting, pipeline optimization, and ensures transparency in the end-to-end handling of search requests and responses. This functionality is available for all three ways of using a search pipeline: +The `verbose_pipeline` parameter offers detailed insights into the flow and transformation of data through search request, search response and search phase processor in the search pipeline. It facilitates troubleshooting, pipeline optimization, and ensures transparency in the end-to-end handling of search requests and responses. This functionality is available for all three ways of using a search pipeline: - [Specifying an existing pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#specifying-an-existing-search-pipeline-for-a-request). @@ -18,13 +18,13 @@ The `verbose_pipeline` parameter offers detailed insights into the flow and tran - [Setting a default pipeline for all requests in an index]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#default-search-pipeline). - To enable the `verbose_pipeline` feature, simply add `verbose_pipeline=true` as a query parameter in your search request. + To enable the `verbose_pipeline` feature, add `verbose_pipeline=true` as a query parameter in your search request. ### Example request with verbose pipeline You can specify the `verbose_pipeline` parameter in the query to enable detailed debugging. The `verbose_pipeline` parameter works seamlessly across all search pipeline configurations: -#### Default Search Pipeline +#### With Default Search Pipeline To use `verbose_pipeline` with a default search pipeline, set the pipeline as the default in the index settings and include `verbose_pipeline=true` in the query: @@ -41,14 +41,14 @@ GET /my_index/_search?verbose_pipeline=true ``` {% include copy-curl.html %} -#### Specified Search Pipeline by ID +#### With Specified Search Pipeline by ID To use `verbose_pipeline` with a specific search pipeline, specify the pipeline ID along with verbose_pipeline=true in the query: ```json GET /my_index/_search?search_pipeline=my_pipeline&verbose_pipeline=true ``` {% include copy-curl.html %} -#### Temporary Search Pipeline +#### With Temporary Search Pipeline To use `verbose_pipeline` with a temporary search pipeline, define the pipeline directly in the request body and include verbose_pipeline=true in the query: ```json POST /my_index/_search?verbose_pipeline=true @@ -87,89 +87,137 @@ When the `verbose_pipeline` parameter is enabled, the response contains an addit ```json { - "took": 40, - "timed_out": false, - "_shards": { - "total": 1, - "successful": 1, - "skipped": 0, - "failed": 0 - }, - "hits": { - "total": { - "value": 1, - "relation": "eq" + "took": 27, + "timed_out": false, + "_shards": { + "total": 1, + "successful": 1, + "skipped": 0, + "failed": 0 }, - "max_score": 0.0, - "hits": [ - { - "_index": "my_index", - "_id": "1", - "_score": 0.0, - "_source": { - "notification": "This is a public message", - "visibility": "public" - } - } - ] - }, - "processor_results": [ - { - "processor_name": "filter_query", - "tag": "tag1", - "duration_millis": 1094542, - "status": "success", - "input_data": { - "verbose_pipeline": true - }, - "output_data": { - "verbose_pipeline": true, - "query": { - "bool": { - "filter": [ - { - "term": { - "visibility": { - "boost": 1.0, - "value": "public" - } + "hits": { + "total": { + "value": 1, + "relation": "eq" + }, + "max_score": 0.18232156, + "hits": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.18232156, + "_source": { + "notification": "This is a public message", + "visibility": "public" } - } - ], - "adjust_pure_negative": true, - "boost": 1.0 - } - } - } + } + ] }, - { - "processor_name": "rename_field", - "duration_millis": 1336958, - "status": "success", - "input_data": [ + "processor_results": [ { - "_index": "my_index", - "_id": "1", - "_score": 0.0, - "_source": { - "message": "This is a public message", - "visibility": "public" - } - } - ], - "output_data": [ + "processor_name": "filter_query", + "tag": "tag1", + "duration_millis": 288541, + "status": "success", + "input_data": { + "verbose_pipeline": true, + "query": { + "bool": { + "adjust_pure_negative": true, + "must": [ + { + "match": { + "message": { + "auto_generate_synonyms_phrase_query": true, + "query": "this", + "zero_terms_query": "NONE", + "fuzzy_transpositions": true, + "boost": 1.0, + "prefix_length": 0, + "operator": "OR", + "lenient": false, + "max_expansions": 50 + } + } + } + ], + "boost": 1.0 + } + } + }, + "output_data": { + "verbose_pipeline": true, + "query": { + "bool": { + "filter": [ + { + "term": { + "visibility": { + "boost": 1.0, + "value": "public" + } + } + } + ], + "adjust_pure_negative": true, + "must": [ + { + "bool": { + "adjust_pure_negative": true, + "must": [ + { + "match": { + "message": { + "auto_generate_synonyms_phrase_query": true, + "query": "this", + "zero_terms_query": "NONE", + "fuzzy_transpositions": true, + "boost": 1.0, + "prefix_length": 0, + "operator": "OR", + "lenient": false, + "max_expansions": 50 + } + } + } + ], + "boost": 1.0 + } + } + ], + "boost": 1.0 + } + } + } + }, { - "_index": "my_index", - "_id": "1", - "_score": 0.0, - "_source": { - "notification": "This is a public message", - "visibility": "public" - } + "processor_name": "rename_field", + "duration_millis": 250042, + "status": "success", + "input_data": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.18232156, + "_source": { + "message": "This is a public message", + "visibility": "public" + } + } + ], + "output_data": [ + { + "_index": "my_index", + "_id": "1", + "_score": 0.18232156, + "_source": { + "notification": "This is a public message", + "visibility": "public" + } + } + ] } - ] - } - ] + ] } ``` \ No newline at end of file From 306ab5a3a216a9aeb273be7a04e366498f87d72a Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Fri, 31 Jan 2025 13:42:49 -0500 Subject: [PATCH 6/7] Doc review Signed-off-by: Fanit Kolchina --- .../debugging-search-pipeline.md | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/_search-plugins/search-pipelines/debugging-search-pipeline.md b/_search-plugins/search-pipelines/debugging-search-pipeline.md index 29c6a8603b..50618101a9 100644 --- a/_search-plugins/search-pipelines/debugging-search-pipeline.md +++ b/_search-plugins/search-pipelines/debugging-search-pipeline.md @@ -10,21 +10,17 @@ grand_parent: Search # Debugging a search pipeline -The `verbose_pipeline` parameter offers detailed insights into the flow and transformation of data through search request, search response and search phase processor in the search pipeline. It facilitates troubleshooting, pipeline optimization, and ensures transparency in the end-to-end handling of search requests and responses. This functionality is available for all three ways of using a search pipeline: +The `verbose_pipeline` parameter provides detailed insights into data flow and transformations for the search request, search response, and search phase processors in the search pipeline. It helps with troubleshooting and optimizing the pipeline and ensures transparency in handling search requests and responses. -- [Specifying an existing pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#specifying-an-existing-search-pipeline-for-a-request). +## Enabling debugging -- [Using a temporary pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#using-a-temporary-search-pipeline-for-a-request). +To enable pipeline debugging, specify `verbose_pipeline=true` as a query parameter in your search request. This functionality is available for all three methods of using a search pipeline: -- [Setting a default pipeline for all requests in an index]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#default-search-pipeline). +- [Default search pipeline](#default-search-pipeline) +- [Specific search pipeline](#specific-search-pipeline) +- [Temporary search pipeline](#temporary-search-pipeline) - To enable the `verbose_pipeline` feature, add `verbose_pipeline=true` as a query parameter in your search request. - -### Example request with verbose pipeline - -You can specify the `verbose_pipeline` parameter in the query to enable detailed debugging. The `verbose_pipeline` parameter works seamlessly across all search pipeline configurations: - -#### With Default Search Pipeline +### Default search pipeline To use `verbose_pipeline` with a default search pipeline, set the pipeline as the default in the index settings and include `verbose_pipeline=true` in the query: @@ -41,15 +37,23 @@ GET /my_index/_search?verbose_pipeline=true ``` {% include copy-curl.html %} -#### With Specified Search Pipeline by ID -To use `verbose_pipeline` with a specific search pipeline, specify the pipeline ID along with verbose_pipeline=true in the query: +For more information about default search pipelines, see [Setting a default pipeline for all requests in an index]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#default-search-pipeline). + +### Specific search pipeline + +To use `verbose_pipeline` with a specific search pipeline, specify the pipeline ID and include `verbose_pipeline=true` in the query: + ```json GET /my_index/_search?search_pipeline=my_pipeline&verbose_pipeline=true ``` {% include copy-curl.html %} -#### With Temporary Search Pipeline -To use `verbose_pipeline` with a temporary search pipeline, define the pipeline directly in the request body and include verbose_pipeline=true in the query: +For more information, about using specific search pipelines see [Specifying an existing pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#specifying-an-existing-search-pipeline-for-a-request). + +### Temporary search pipeline + +To use `verbose_pipeline` with a temporary search pipeline, define the pipeline directly in the request body and include `verbose_pipeline=true` in the query: + ```json POST /my_index/_search?verbose_pipeline=true { @@ -75,7 +79,10 @@ POST /my_index/_search?verbose_pipeline=true } ``` {% include copy-curl.html %} -### Example response with verbose pipeline + +For more information about using a temporary search pipeline, see [Using a temporary pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#using-a-temporary-search-pipeline-for-a-request). + +## Example response When the `verbose_pipeline` parameter is enabled, the response contains an additional `processor_results` field that details the transformations applied by each processor in the pipeline: From 1111e0adcd0b88fcf358720988571e34be6a8f92 Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:59:41 -0500 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Nathan Bower Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --- .../search-pipelines/debugging-search-pipeline.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_search-plugins/search-pipelines/debugging-search-pipeline.md b/_search-plugins/search-pipelines/debugging-search-pipeline.md index 50618101a9..c44f40bc0f 100644 --- a/_search-plugins/search-pipelines/debugging-search-pipeline.md +++ b/_search-plugins/search-pipelines/debugging-search-pipeline.md @@ -10,11 +10,11 @@ grand_parent: Search # Debugging a search pipeline -The `verbose_pipeline` parameter provides detailed insights into data flow and transformations for the search request, search response, and search phase processors in the search pipeline. It helps with troubleshooting and optimizing the pipeline and ensures transparency in handling search requests and responses. +The `verbose_pipeline` parameter provides detailed information about the data flow and transformations for the search request, search response, and search phase processors in the search pipeline. It helps with troubleshooting and optimizing the pipeline and ensures transparency in handling search requests and responses. ## Enabling debugging -To enable pipeline debugging, specify `verbose_pipeline=true` as a query parameter in your search request. This functionality is available for all three methods of using a search pipeline: +To enable pipeline debugging, specify `verbose_pipeline=true` as a query parameter in your search request. This functionality is available for all three search pipeline methods: - [Default search pipeline](#default-search-pipeline) - [Specific search pipeline](#specific-search-pipeline) @@ -48,7 +48,7 @@ GET /my_index/_search?search_pipeline=my_pipeline&verbose_pipeline=true ``` {% include copy-curl.html %} -For more information, about using specific search pipelines see [Specifying an existing pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#specifying-an-existing-search-pipeline-for-a-request). +For more information about using specific search pipelines, see [Specifying an existing pipeline for a request]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/using-search-pipeline/#specifying-an-existing-search-pipeline-for-a-request). ### Temporary search pipeline @@ -84,7 +84,7 @@ For more information about using a temporary search pipeline, see [Using a tempo ## Example response -When the `verbose_pipeline` parameter is enabled, the response contains an additional `processor_results` field that details the transformations applied by each processor in the pipeline: +When the `verbose_pipeline` parameter is enabled, the response contains an additional `processor_results` field that provides information about the transformations applied by each processor in the pipeline: