Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated documentation for using search pipeline for multiple indices #7053

Merged
merged 7 commits into from
May 8, 2024
47 changes: 47 additions & 0 deletions _search-plugins/search-pipelines/using-search-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,53 @@ The response contains only the public document, indicating that the pipeline was
```
</details>

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 includes only the public version of the document, confirming that the default pipeline was successfully applied:

<details open markdown="block">
<summary>
Response
</summary>
{: .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"
}
}
]
}
}
```
</details>

### 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`:
Expand Down
Loading