У меня есть индекс с данными ежедневного переподключения.
это выглядит так:
"_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"
}
}
}
}
Каждый день будет создаваться такой документ (с дополнительным днем в деталях переподключения.
Я хотел бы построить график, показывающий процент возвратов за конкретный день (например, каков процент возвратов в первый день).
Как бы вы поступили так, не меняя отображение?
Cheers,
Julien