From 3e62cf9d74a4d80948d73a32cd937d80cca58834 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 29 Aug 2019 10:07:52 -0400 Subject: [PATCH] [DOCS] Correct custom analyzer callouts (#46030) --- .../analyzers/custom-analyzer.asciidoc | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/reference/analysis/analyzers/custom-analyzer.asciidoc b/docs/reference/analysis/analyzers/custom-analyzer.asciidoc index 92133822fa5..4b601a0b9bd 100644 --- a/docs/reference/analysis/analyzers/custom-analyzer.asciidoc +++ b/docs/reference/analysis/analyzers/custom-analyzer.asciidoc @@ -162,26 +162,26 @@ PUT my_index "settings": { "analysis": { "analyzer": { - "my_custom_analyzer": { + "my_custom_analyzer": { <1> "type": "custom", "char_filter": [ - "emoticons" <1> + "emoticons" ], - "tokenizer": "punctuation", <1> + "tokenizer": "punctuation", "filter": [ "lowercase", - "english_stop" <1> + "english_stop" ] } }, "tokenizer": { - "punctuation": { <1> + "punctuation": { <2> "type": "pattern", "pattern": "[ .,!?]" } }, "char_filter": { - "emoticons": { <1> + "emoticons": { <3> "type": "mapping", "mappings": [ ":) => _happy_", @@ -190,7 +190,7 @@ PUT my_index } }, "filter": { - "english_stop": { <1> + "english_stop": { <4> "type": "stop", "stopwords": "_english_" } @@ -207,9 +207,12 @@ POST my_index/_analyze -------------------------------------------------- // CONSOLE -<1> The `emoticons` character filter, `punctuation` tokenizer and - `english_stop` token filter are custom implementations which are defined - in the same index settings. +<1> Assigns the index a default custom analyzer, `my_custom_analyzer`. This +analyzer uses a custom tokenizer, character filter, and token filter that +are defined later in the request. +<2> Defines the custom `punctuation` tokenizer. +<3> Defines the custom `emoticons` character filter. +<4> Defines the custom `english_stop` token filter. /////////////////////