Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Correct custom analyzer callouts #46030

Merged
merged 2 commits into from
Aug 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions docs/reference/analysis/analyzers/custom-analyzer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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_",
Expand All @@ -190,7 +190,7 @@ PUT my_index
}
},
"filter": {
"english_stop": { <1>
"english_stop": { <4>
"type": "stop",
"stopwords": "_english_"
}
Expand All @@ -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.

/////////////////////

Expand Down