Skip to content

Commit 19a4fe1

Browse files
authored
Merge branch 'main' into main
2 parents 66c4c73 + c96f86e commit 19a4fe1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

_observing-your-data/query-insights/top-n-queries.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,21 @@ PUT _cluster/settings
334334
}
335335
```
336336
{% include copy-curl.html %}
337+
338+
## Excluding indexes from top N queries
339+
340+
You can exclude search queries from the top N query list based on the indexes they target. This is useful when certain indexes are known to have long-running queries and don't need to be monitored.
341+
342+
A query is excluded if it searches any shard that belongs to an index listed in `excluded_indices`.
343+
344+
By default, this setting is `null` (all indexes are included). To exclude specific indexes, provide a comma-separated list of index names in the `search.insights.top_queries.excluded_indices` setting:
345+
346+
```json
347+
PUT _cluster/settings
348+
{
349+
"persistent" : {
350+
"search.insights.top_queries.excluded_indices" : "index-1,index-2,index-3"
351+
}
352+
}
353+
```
354+
{% include copy-curl.html %}

0 commit comments

Comments
 (0)