Factor aggregate score on child collection into query on parent

I want to create a search system where a user's search is analyzed against similar searches. Here is an example of the data in my system:

Each document in my system contains a list of events wherein the document was read - typically after the user entered in a search query.

I want to perform a query on all the elements in this "postReadEventCollection" for each post, and then sum the results, and factor the sum into a query on the document.

How do I go about doing this?

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