This ticket will add the drill Streaming Expression. The drill Streaming Expression is a wrapper around the functionality that is described in
SOLR-14470. The idea is for drill to contact the /export handler on one replica in each shard of a collection and pass four parameters:
- q: query
- fl: field list
- sort: sort spec
- expr: The Streaming Expression sent to the /export handler to be executed.
The export handler will pass the result set through the streaming expression performing an aggregation on the sorted result set and return the aggregated tuples. The drill expression will simply maintain the sort order of the tuples and emit them so that a wrapper expression can perform operations on the sorted aggregate tuples.
In order to finish the aggregation other expressions can be used:
This provides fast aggregation over fields with infinite cardinality by pushing down the first level of aggregation into the /export handler.