Skip to content
鼓励作者:欢迎打赏犒劳

ES分词

查看某字段的分词效果

shell
GET test_index/_analyze
{
  "field": "obj_field.key1",
  "text":"hello world"
}

结果如下

json
{
  "tokens" : [
    {
      "token" : "hello",
      "start_offset" : 0,
      "end_offset" : 5,
      "type" : "<ALPHANUM>",
      "position" : 0
    },
    {
      "token" : "world",
      "start_offset" : 6,
      "end_offset" : 11,
      "type" : "<ALPHANUM>",
      "position" : 1
    }
  ]
}

如有转载或 CV 的请标注本站原文地址