Skip to content

Commit

Permalink
Updated documentation for using search pipeline for multiple indices
Browse files Browse the repository at this point in the history
Signed-off-by: owaiskazi19 <[email protected]>
  • Loading branch information
owaiskazi19 committed Apr 29, 2024
1 parent cac36b2 commit 59bebd8
Showing 1 changed file with 47 additions and 0 deletions.
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 also search on multiple indices having the same default pipeline. For example, the below alias1 has 2 indices my_index1 and my_index2 and both the indices have the same default pipeline `my_pipeline` attached to them.

Check failure on line 133 in _search-plugins/search-pipelines/using-search-pipeline.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'.", "location": {"path": "_search-plugins/search-pipelines/using-search-pipeline.md", "range": {"start": {"line": 133, "column": 33}}}, "severity": "ERROR"}

Check warning on line 133 in _search-plugins/search-pipelines/using-search-pipeline.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.DirectionAboveBelow] Use 'following or later' instead of 'below' for versions or orientation within a document. Use 'above' and 'below' only for physical space or screen descriptions. Raw Output: {"message": "[OpenSearch.DirectionAboveBelow] Use 'following or later' instead of 'below' for versions or orientation within a document. Use 'above' and 'below' only for physical space or screen descriptions.", "location": {"path": "_search-plugins/search-pipelines/using-search-pipeline.md", "range": {"start": {"line": 133, "column": 92}}}, "severity": "WARNING"}

Check failure on line 133 in _search-plugins/search-pipelines/using-search-pipeline.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'.", "location": {"path": "_search-plugins/search-pipelines/using-search-pipeline.md", "range": {"start": {"line": 133, "column": 111}}}, "severity": "ERROR"}

```json
GET /alias1/_search
```
{% include copy-curl.html %}

The response contains only the public document, indicating that the pipeline was applied by default:

<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

0 comments on commit 59bebd8

Please sign in to comment.