I am trying to get statistics using the log of the homepage user.
There are three types of logs: login log, user action log (search, click), and video enrollment information.
I want to store these logs in three Indexes of the form below.
-
homepage_video_index
{
"user":"username",
"action":"study",
"context": {
"category":"category name",
"name":""
}
"success":true,
"timestamp:"yyyy-MM-dd HH:mm:ss"
} -
homepage_action_index
{
"user":"username",
"action":"search",
"context":{
"category":"",
"name":"search keyword",
"timestamp:"yyyy-MM-dd HH:mm:ss"
}
} -
homepage_login_index
{
"user":"username",
"action":"login",
"timestamp:"yyyy-MM-dd HH:mm:ss"
}
The information to obtain is as follows.
I'd like to know how much of the users who have searched for a particular keyword actually saw a video of a particular keyword.
And I want to divide user groups according to the number of logins and find out which videos the group saw.
For example, The number of users who searched for the keyword 'A' who actually saw the video 'A'.
For example, List of videos viewed by users who have logged in more than 10 times.
How to data to get the above information?
GET homepage_*/_search
{
"aggs":{......}
}
Or If I don't get that data with your current structure, what should you do with index design?