美文网首页
测试分词

测试分词

作者: 良人与我 | 来源:发表于2019-07-12 10:40 被阅读0次

    备注下 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

    相关文章

      网友评论

          本文标题:测试分词

          本文链接:https://www.haomeiwen.com/subject/ocxekctx.html