File tree 1 file changed +13
-10
lines changed
docs/reference/analysis/analyzers
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -162,26 +162,26 @@ PUT my_index
162
162
"settings": {
163
163
"analysis": {
164
164
"analyzer": {
165
- "my_custom_analyzer": {
165
+ "my_custom_analyzer": { <1>
166
166
"type": "custom",
167
167
"char_filter": [
168
- "emoticons" <1>
168
+ "emoticons"
169
169
],
170
- "tokenizer": "punctuation", <1>
170
+ "tokenizer": "punctuation",
171
171
"filter": [
172
172
"lowercase",
173
- "english_stop" <1>
173
+ "english_stop"
174
174
]
175
175
}
176
176
},
177
177
"tokenizer": {
178
- "punctuation": { <1 >
178
+ "punctuation": { <2 >
179
179
"type": "pattern",
180
180
"pattern": "[ .,!?]"
181
181
}
182
182
},
183
183
"char_filter": {
184
- "emoticons": { <1 >
184
+ "emoticons": { <3 >
185
185
"type": "mapping",
186
186
"mappings": [
187
187
":) => _happy_",
@@ -190,7 +190,7 @@ PUT my_index
190
190
}
191
191
},
192
192
"filter": {
193
- "english_stop": { <1 >
193
+ "english_stop": { <4 >
194
194
"type": "stop",
195
195
"stopwords": "_english_"
196
196
}
@@ -207,9 +207,12 @@ POST my_index/_analyze
207
207
--------------------------------------------------
208
208
// CONSOLE
209
209
210
- <1> The `emoticons` character filter, `punctuation` tokenizer and
211
- `english_stop` token filter are custom implementations which are defined
212
- in the same index settings.
210
+ <1> Assigns the index a default custom analyzer, `my_custom_analyzer`. This
211
+ analyzer uses a custom tokenizer, character filter, and token filter that
212
+ are defined later in the request.
213
+ <2> Defines the custom `punctuation` tokenizer.
214
+ <3> Defines the custom `emoticons` character filter.
215
+ <4> Defines the custom `english_stop` token filter.
213
216
214
217
/////////////////////
215
218
You can’t perform that action at this time.
0 commit comments