原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/configuring-analyzers.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/configuring-analyzers.html
本地英文版地址: ../en/configuring-analyzers.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Configuring built-in analyzersedit
The built-in analyzers can be used directly without any configuration. Some
of them, however, support configuration options to alter their behaviour. For
instance, the standard analyzer can be configured
to support a list of stop words:
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"std_english": {
"type": "standard",
"stopwords": "_english_"
}
}
}
},
"mappings": {
"properties": {
"my_text": {
"type": "text",
"analyzer": "standard",
"fields": {
"english": {
"type": "text",
"analyzer": "std_english"
}
}
}
}
}
}
POST my_index/_analyze
{
"field": "my_text",
"text": "The old brown cow"
}
POST my_index/_analyze
{
"field": "my_text.english",
"text": "The old brown cow"
}
|
We define the |
|
|
The |
|
|
The |