Skip to content

Commit d5f8ed7

Browse files
committed
Adds documentation for providing search pipeline id in the request
1 parent 4782c3e commit d5f8ed7

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

_search-plugins/search-pipelines/using-search-pipeline.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,32 @@ GET /my_index/_search?search_pipeline=my_pipeline
2727
For a complete example of using a search pipeline with a `filter_query` processor, see [`filter_query` processor example]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/filter-query-processor#example).
2828

2929
## Using a temporary search pipeline for a request
30+
1. You can provide a search pipeline id in the search request:
3031

31-
As an alternative to creating a search pipeline, you can define a temporary search pipeline to be used for only the current query:
32+
```json
33+
GET /my-index/_search
34+
{
35+
"query": {
36+
"match_all": {}
37+
},
38+
"from": 0,
39+
"size": 10,
40+
"search_pipeline": "my_pipeline"
41+
}
42+
```
43+
44+
or for msearch
45+
```json
46+
GET /_msearch
47+
{ "index": "test"}
48+
{ "query": { "match_all": {} }, "from": 0, "size": 10, "search_pipeline": "my_pipeline"}
49+
{ "index": "test-1", "search_type": "dfs_query_then_fetch"}
50+
{ "query": { "match_all": {} }, "search_pipeline": "my_pipeline1" }
51+
52+
```
53+
{% include copy-curl.html %}
54+
55+
2. As an alternative to creating a search pipeline, you can define a temporary search pipeline to be used for only the current query:
3256

3357
```json
3458
POST /my-index/_search

0 commit comments

Comments
 (0)