我在 Elasticsearch 中有一个索引,其映射如下:
{
"mappings": {
"_doc": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"action_type": {
"type": "keyword"
},
"bts": {
"properties": {
"cell": {
"type": "integer"
},
"city": {
"type": "keyword"
},
"estimated_geo": {
"type": "geo_point"
},
"geo": {
"type": "geo_point"
},
"id": {
"type": "keyword"
},
"lac": {
"type": "integer"
},
"province": {
"type": "keyword"
}
}
},
"download_result": {
"properties": {
"download_size": {
"type": "integer"
},
"download_time": {
"type": "integer"
},
"download_url": {
"type": "keyword"
}
}
},
"get_result": {
"properties": {
"get_size": {
"type": "integer"
},
"get_time": {
"type": "integer"
},
"get_url": {
"type": "keyword"
}
}
},
"ip": {
"type": "ip"
},
"isp": {
"type": "keyword"
},
"location": {
"properties": {
"city": {
"type": "keyword"
},
"geo": {
"type": "geo_point"
},
"province": {
"type": "keyword"
}
}
},
"mobile_operator": {
"type": "keyword"
},
"mobile_type_network": {
"type": "keyword"
},
"network_type": {
"type": "keyword"
},
"ping_result": {
"properties": {
"ping_ip": {
"type": "ip"
},
"ping_loss": {
"type": "float"
},
"ping_time": {
"type": "integer"
}
}
},
"signal_level": {
"type": "integer"
},
"timestamp": {
"type": "date"
},
"upload_result": {
"properties": {
"upload_size": {
"type": "integer"
},
"upload_time": {
"type": "integer"
},
"upload_url": {
"type": "keyword"
}
}
},
"user_id": {
"type": "keyword"
},
"user_session": {
"type": "keyword"
}
}
}
}
}
还有一个文件,我可以根据城市、地区等在我的地图上显示一些数据。现在,如果大于geojson
,我想将城市涂成蓝色(这就像美国各州的选举结果图一样)。最后,我将有一张地图,它的所有城市都只有两种颜色:基于平均比较的蓝色或红色。这可以通过 kibana 获得吗?我该如何部署它?avg(some_field)
avg(another_field)