From 6df60b7271ef96a9987a1178bf6f448e1276c7a2 Mon Sep 17 00:00:00 2001 From: Dan Everton Date: Fri, 1 Nov 2013 12:31:02 +1000 Subject: [PATCH] [DOC] Improve documentation on search stats groups Document the ability to return all search statistics groups and provide examples of returning search statistics for groups. --- docs/reference/indices/stats.asciidoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/reference/indices/stats.asciidoc b/docs/reference/indices/stats.asciidoc index 26a154d5d27..c5afb98b7bf 100644 --- a/docs/reference/indices/stats.asciidoc +++ b/docs/reference/indices/stats.asciidoc @@ -34,9 +34,10 @@ are returned, other stats can be enabled as well: `get`:: Get statistics, including missing stats. -`search`:: Search statistics, including custom grouping using the - `groups` parameter (search operations can be associated with one or more - groups). +`search`:: Search statistics. You can include statistics for custom groups by adding + an extra `groups` parameter (search operations can be associated with one or more + groups). The `groups` parameter accepts a comma separated list of group names. + Use `_all` to return statistics for all groups. `warmer`:: Warmer statistics. `merge`:: Merge statistics. @@ -63,6 +64,8 @@ curl 'localhost:9200/_stats?merge=true&refresh=true' curl 'localhost:9200/_stats?clear=true&flush=true' # Get back stats for type1 and type2 documents for the my_index index curl 'localhost:9200/my_index/_stats?clear=true&indexing=true&types=type1,type2 +# Get back just search stats for group1 and group2 +curl 'localhost:9200/_stats?clear=true&search=true&groups=group1,group2 -------------------------------------------------- The stats returned are aggregated on the index level, with @@ -90,4 +93,6 @@ curl localhost:9200/my_index/_stats/merge curl localhost:9200/my_index/_stats/indexing # Indexing stats for my_index for my_type1 and my_type2 curl localhost:9200/my_index/_stats/indexing/my_type1,my_type2 +# Search stats for group1 and group2 +curl 'localhost:9200/_stats/search/group1,group2 --------------------------------------------------