lucene icon indicating copy to clipboard operation
lucene copied to clipboard

Compute multiple float aggregations in one go

Open stefanvodita opened this issue 1 year ago • 6 comments

Usually facets maintain a one-dimensional array indexed by ordinal which keeps the values they're supposed to compute. The change here is simple in principle - use a two-dimensional array, indexed by aggregation and ordinal, so we can do multiple aggregations at once.

For the methods that get top children / all children / spcific values / dims, the default is to get the values corresponding to the first aggregation, but the aggregation can be specified.

There is one tricky bit when we aggregate using provided values sources. In this case, we advance the values sources and get the values for each aggregation before iterating through the ordinals in each doc. When we iterate through the ordinals, we load each of the values we've already retrieved and update the corresponding accumulator.

Addresses #12546

stefanvodita avatar Sep 09 '23 21:09 stefanvodita

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Jan 08 '24 12:01 github-actions[bot]

Thank you for the approval! I want to leave this open for now while iterating over #12966. I think I prefer doing #12966 first, since it's a more complicated change and doing it first should allow us to have a more unified solution across int/float facets.

stefanvodita avatar Feb 15 '24 15:02 stefanvodita

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Mar 01 '24 00:03 github-actions[bot]