Use of aggregations with multiple queries

Hello,

I've been having trouble getting some results for a while, and I'm starting to wonder if my query is even feasible.

I have a set of documents collecting articles, with fields like date, title, and a nested authors field with first and last name.

I would like to be able to retrieve documents linked to a 'match' filter in a query, for example, titles that have the word "winter".

Then, I would like to do some aggregations on these filtered documents, like retrieving for each author (name+firstname) the number of articles, but also be able to do it on all documents.

So in fact, in one query, to be able to retrieve both information on the authors linked to the query, and on these same authors, aggregation information linked to all the documents.

I don't have any problems retrieving the information separately, but I'd like to be able to do it jointly, to save time on a join between each author afterwards.

Do you think this is possible?

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