1.查看索引已存储数据字段分词结果

  1. GET test_index1/_doc/{id}/_termvectors?fields={field}
  2. GET test_index1/_doc/1/_termvectors?fields=name

2.查看字符分词结果

  1. GET _analyze
  2. {
  3. "analyzer":"standard",#分词器
  4. "text":"中国棒棒的"
  5. }

3.查看字符在索引字段里的分词结果

  1. GET test_index1/_analyze
  2. {
  3. "text": "老用户有礼",
  4. "field":"describe"
  5. }

IK分词器(ES本身没有,需要安装IK分词器)分词类型

  1. ik_smart 最粗粒度,尽量的块状,分词的数目最少
  2. ik_max_word 最细粒度,分词出来的数目最多
  3. stop 停用词
  4. keyword 关键词,整一段