Configuring built-in analyzers(配置内置分析器)
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"std_english": { #1
"type": "standard",
"stopwords": "_english_"
}
}
}
},
"mappings": {
"my_type": {
"properties": {
"my_text": {
"type": "text",
"analyzer": "standard", #2
"fields": {
"english": {
"type": "text",
"analyzer": "std_english" #3
}
}
}
}
}
}}
POST my_index/_analyze
{
"field": "my_text", #4
"text": "The old brown cow"}
POST my_index/_analyze
{
"field": "my_text.english", #5
"text": "The old brown cow"
}Last updated