Som celkom ES začiatočník a som zvedavý, či to, čo chcem urobiť, je dokonca možné.
Mám po viewer
index s týmito mapovanie:
"mappings": {
"properties": {
"id": {"type": "text"},
"name": {"type": "text"},
"location": {"type": "text"},
"viewed_videos": { //array of all the videos a viewer saw and their view counts
"type": "nested",
"properties": {
"id": {"type": "text"},
"name": {"type": "text"},
"description": {"type": "text"},
"times_viewed": {"type": "long"},
},
},
}
}
Chcem zistiť, aké sú najsledovanejších videí podľa polohy. Takže musím spôsobom zhrnul times_viewed
pre každý viewed_video
v mnohých viewer
s a potom sa dostať na vrchol X a ty pre dané miesto.
Je to možné?