Hi Lucene devs, I work on product search at Amazon, where we use Lucene faceting to compute aggregations. There's a few functionalities I'm missing with faceting. For example, faceting will always aggregate all the way up to the dimension and it can't compute multiple aggregations in one pass of the match-set.
Lucene-based search engines (like Elastic or OpenSearch) have feature-rich aggregation engines which allow different collection modes and give the user more control over the granularity of the scopes for which aggregations are computed. Are there historical reasons not to have this type of aggregation engine directly in Lucene? If it seems like a worthwhile idea to pursue, I've experimented a bit with how we could fulfill these needs in Lucene and I can open an issue/PR. Thanks, Shradha