Sunt un total ES începător și mă întreb dacă ceea ce vreau să fac este chiar posibil.
Am urmatoarea o viewer
indicele cu următorul text mapping:
"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"},
},
},
}
}
Vreau să-mi dau seama care sunt cele mai vizualizate videoclipuri în funcție de locație. Deci am nevoie de o modalitate de a rezuma times_viewed
pentru fiecare viewed_video
în multe viewer
s și apoi a obține partea de sus X, pentru o anumită locație.
Este posibil?