备注下 es 的查看分词效果 指令
#查看不同的analyzer的效果
#standard
GET _analyze
{
"analyzer": "standard",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
#simpe
GET _analyze
{
"analyzer": "simple",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
GET _analyze
{
"analyzer": "stop",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
#stop
GET _analyze
{
"analyzer": "whitespace",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
#keyword
GET _analyze
{
"analyzer": "keyword",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
GET _analyze
{
"analyzer": "pattern",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
#english
GET _analyze
{
"analyzer": "english",
"text": "2 running Quick brown-foxes leap over lazy dogs in the summer evening."
}
#ik_smart
GET _analyze
{
"analyzer": "ik_smart",
"text": "中国你好,中国人民 万岁"
}
#ik_max_word
GET _analyze
{
"analyzer": "ik_max_word",
"text": "中国你好,中国人民 万岁"
}
参考地址
https://www.elastic.co/guide/en/elasticsearch/reference/7.1/indices-analyze.html
https://www.elastic.co/guide/cn/elasticsearch/guide/current/analysis-intro.html
网友评论