Elasticsearch常用操作



  • Elasticsearch指定默认分词器

    {
      "settings": {
        "index": {
          "analysis.analyzer.default.type": "zhongwen"
         }
       }
    }
    

    Elasticsearch添加字段

    put realtime_statistics_teacher_new_v1/_mapping/realtime_statistics_teacher_new
    
    //put index/_mapping/type
    
    {
    
      "properties": {
    
           "filed1": {
    
               "type":     "integer"
    
           },
    
            "filed2": {
    
               "type":     "integer"
    
           },
    
            "filed3": {
    
               "type":     "integer",
               "analyzer": "zhongwen" //指定分词器
    
           }
    
       }
    
    }
    

    来自:https://www.cnblogs.com/llgogo/p/11724893.html


Log in to reply
 

最新帖子

推荐阅读