LAPTOP-KB9HII50\70708 2 år sedan
förälder
incheckning
8bec8f563e
1 ändrade filer med 96 tillägg och 0 borttagningar
  1. 96 0
      svr/svr-iot/sql-scripts/es7/body_health_data_es.txt

+ 96 - 0
svr/svr-iot/sql-scripts/es7/body_health_data_es.txt

@ -0,0 +1,96 @@
es7没有type的概念
创建索引
PUT  http://172.26.0.112:9200/body_health_data
查询索引
get http://172.26.0.112:9200/body_health_data
给索引加mapping
PUT http://172.26.0.112:9200/body_health_data
{
    "mappings": {
        "properties": {
            "device_name": {
                "type": "keyword"
            },
            "del": {
                "type": "keyword"
            },
            "rid": {
                "type": "keyword"
            },
            "status": {
                "type": "keyword"
            },
            "measure_data": {
                "properties": {
                    "type": {
                        "type": "keyword"
                    },
                    "measure_time": {
                        "type": "keyword"
                    },
                     "sign_name": {
                         "type": "keyword"
                     },
                     "sign_value": {
                         "type": "keyword"
                     },
                     "sign_unit": {
                         "type": "keyword"
                     },
                      "explain": {
                          "type": "keyword"
                      },
                      "filepath": {
                          "type": "keyword"
                      },
                      "reference": {
                          "type": "keyword"
                      }
                }
            },
            "position_data": {
                "properties": {
                    "location": {
                        "type": "geo_point"
                    },
                    "altitude": {
                        "type": "keyword"
                    },
                    "position": {
                        "type": "keyword"
                    }
                }
            },
            "device_model": {
                "type": "keyword"
            },
            "ext_code": {
                "type": "keyword"
            },
            "idcard": {
                "type": "keyword"
            },
            "idcard_type": {
                "type": "keyword"
            },
            "sn": {
                "type": "keyword"
            },
            "usercode": {
                "type": "keyword"
            },
            "data_source": {
                "type": "keyword"
            },
            "username": {
                "type": "keyword"
            }
        }
    }
}