From a9039ce28b18b3f0a55f4df455f617cbdbcc8071 Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Tue, 12 May 2020 15:18:50 -0700 Subject: [PATCH 1/3] Correct the type of the 'analyzer' parameter in the _analyze docs. This optional parameter can only be a string. To test out a transient custom analysis chain, users are expected to use the 'tokenizer', 'filter', and 'char_filter' parameters. --- docs/reference/indices/analyze.asciidoc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/reference/indices/analyze.asciidoc b/docs/reference/indices/analyze.asciidoc index 8244a000c7e0e..0f9956f514554 100644 --- a/docs/reference/indices/analyze.asciidoc +++ b/docs/reference/indices/analyze.asciidoc @@ -44,7 +44,7 @@ the `analyzer` or `` parameter overrides this value. If no analyzer or field are specified, the analyze API uses the default analyzer for the index. -If no index is specified +If no index is specified or the index does not have a default analyzer, the analyze API uses the <>. -- @@ -56,11 +56,9 @@ the analyze API uses the <>. `analyzer`:: + -- -(Optional, string or <>) -Analyzer used to analyze for the provided `text`. - -See <> for a list of built-in analyzers. -You can also provide a <>. +(Optional, string) +The name of the analyzer that should be applied to the provided `text`. See <> +for a list of built-in analyzers. If this parameter is not specified, the analyze API uses the analyzer defined in the field's mapping. From 3706d52bb488335ba90f2e6adf7cfad45023cfcb Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Tue, 12 May 2020 15:21:39 -0700 Subject: [PATCH 2/3] Remove a deprecation warning from 5.0. --- docs/reference/indices/analyze.asciidoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/reference/indices/analyze.asciidoc b/docs/reference/indices/analyze.asciidoc index 0f9956f514554..b50dedc33373c 100644 --- a/docs/reference/indices/analyze.asciidoc +++ b/docs/reference/indices/analyze.asciidoc @@ -185,8 +185,6 @@ GET /_analyze } -------------------------------------------------- -deprecated[5.0.0, Use `filter`/`char_filter` instead of `filters`/`char_filters` and `token_filters` has been removed] - Custom tokenizers, token filters, and character filters can be specified in the request body as follows: [source,console] From 80fbc54a7c3eeb1b78ec94ffe3d844743eb2f58b Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Wed, 13 May 2020 10:46:45 -0700 Subject: [PATCH 3/3] Improve description of the 'analyzer' parameter. --- docs/reference/indices/analyze.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/indices/analyze.asciidoc b/docs/reference/indices/analyze.asciidoc index b50dedc33373c..02a4e00588a53 100644 --- a/docs/reference/indices/analyze.asciidoc +++ b/docs/reference/indices/analyze.asciidoc @@ -57,8 +57,8 @@ the analyze API uses the <>. + -- (Optional, string) -The name of the analyzer that should be applied to the provided `text`. See <> -for a list of built-in analyzers. +The name of the analyzer that should be applied to the provided `text`. This could be a +<>, or an analyzer that's been configured in the index. If this parameter is not specified, the analyze API uses the analyzer defined in the field's mapping.