My data in Elasticsearch looks like this:
I have documents that track the number of visits on our website for each page:
I have documents that track when a video on a page is played:
I would like to perform a query that will get me top pages in terms of engagements. In other words, I want the top pages by ratio of the numbers of video played divided by the number of visits.
This means that I am more interested in a page that got 10 visits and 9 video plays than a page that got 1000 visits and 500 video plays.
How would you do that using Elasticsearch? Will I need to update my document and index setup?