我有一个包含每日重新连接数据的索引。 看起来像这样:
"_source": {
"referential_date": "2019-01-14T10:26:22.324Z",
"pool": "all",
"unique_aboids_count": 28237,
"total_reconnection_count": 14044,
"total_reconnection_rate": 0.4973616177355951,
"total_reconnection_marker": 3,
"reconnection_details": [
{
"day": 1,
"date": "2019-01-15T10:26:23.086Z",
"returning_users_count": 10796,
"returning_users_rate": 0.3823352339129511
},
{
"day": 2,
"date": "2019-01-16T10:26:23.763Z",
"returning_users_count": 9720,
"returning_users_rate": 0.3442292028189963
}
]
}
这是我的地图:
"mappings": {
"mappings": {
"properties": {
"query": {
"properties": {
"match_all": {
"type": "object"
}
}
}
}
},
"daily-stats": {
"properties": {
"pool": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"reconnection_details": {
"type": "nested",
"properties": {
"date": {
"type": "date"
},
"day": {
"type": "integer"
},
"returning_users_count": {
"type": "integer"
},
"returning_users_rate": {
"type": "float"
}
}
},
"referential_date": {
"type": "date"
},
"total_reconnection_count": {
"type": "integer"
},
"total_reconnection_marker": {
"type": "integer"
},
"total_reconnection_rate": {
"type": "float"
},
"unique_aboids_count": {
"type": "integer"
}
}
}
}
每天都会生成这样的文档(重新连接的详细信息需要更多的时间。
我想构建一个图表,显示特定日期的回访用户率(例如,第一天的回访率是多少)。
在不更改映射的情况下如何做这样的事情?
干杯, 朱利安