Can I aggregate multiple indexes with different schemas?

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.

  1. homepage_video_index
    {
    "user":"username",
    "action":"study",
    "context": {
    "category":"category name",
    "name":""
    }
    "success":true,
    "timestamp:"yyyy-MM-dd HH:mm:ss"
    }

  2. homepage_action_index
    {
    "user":"username",
    "action":"search",
    "context":{
    "category":"",
    "name":"search keyword",
    "timestamp:"yyyy-MM-dd HH:mm:ss"
    }
    }

  3. 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?

What you're looking for is new in ElasticSearch, called Transforms

It's pretty complicated stuff, but suggest you start with the docs on Transforms. Play with the sample data sets if needed, but the examples they give are essentially the same as what you're looking for.

tldr version of the process, basically you'd query each of those indexes you have for the aggregations you need and then store the results in another index. Then you look at the index.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.