Is this type of query possible in one go?

I am working with reddit comments and want to extract bots for analysis. What I'd like to do is:

  1. Find all unique authors where the comment reply_delay is less than a specific value. Example:

curl -s -H "Content-Type: application/json" -XGET 'localhost:9200/rc/_search?q=reply_delay:<1' -d '{"size":0,"aggs":{"authors":{"terms":{"field":"author.keyword"}}}}'

  1. From this set of authors, I want to pull all documents matching for those authors and then use that document set for new aggregations.

So essentially I'm trying to:

  1. Use a query to limit the initial document set and run a terms query on that.
  2. From that aggregation, I want to build a new document set that I can use additional aggregations against.

Is this a pipeline? Is this even possible?

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