ELK练习

1.ELK练习

 

PUT s3/_doc/1
{
    "mappings" : {
      "doc" : {
        "properties" : {
          
          "name" : {
            "type" : "text",
            "index":false,
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          
          "age" : {
            "index":false,
            "type" : "long"
          },
          
          "desc" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 128,
                "copy_to":["t1", "t2"]
              }
            }
          },
          
          "tags" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 128,
                "copy_to":["t1", "t2"]
              }
            }
          },
          
          
          "info" : {
            "properties":{
              "addr":{
                "type":"text"
              },
             "tel":{
                "type":"long"
              }
            }
          },
          

          "sex" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }
      }
    },
    "settings": {
    "number_of_shards": 3,
    "number_of_replicas": 3
  }
}


GET s3/_doc/1

 

posted @ 2019-05-22 09:05  studybrother  阅读(183)  评论(0编辑  收藏  举报