I need some advice for aggregations.
I am trying to build a recommendation engine based on existing ElasticSearch data but i am out of ideas how to build this query with aggregations.
The easiest way would be to use "significant_terms" but all the examples i found assume a structure like this:
{
"userId": 123
"viewedVideos": [112233, 112244]
},
{
"userId": 124
"viewedVideos": [112233]
}
...but my current index structure looks like this:
{
"userId": 123
"viewedVideoId": 112233
},
{
"userId": 123
"viewedVideoId": 112244
},
{
"userId": 124
"viewedVideoId": 112233
}
What i want to achieve is that user 124 get a suggestion to view the video 112244 after he has watched 112233 because other user who viewed 112233 also viewed 112244.