[ 
https://issues.apache.org/jira/browse/LUCENE-10444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499820#comment-17499820
 ] 

Greg Miller commented on LUCENE-10444:
--------------------------------------

I've got a couple PRs coming shortly for this. I ended up only adding "max" 
aggregation (to the existing "sum" functionality). I had intended to also 
implement average and min, but there are a couple issues with doing so:
 # Average of course requires tracking the number of data points along with a 
running average weight. I think we should add this incrementally when/if we 
tackle LUCENE-10246. LUCENE-10246 captures the idea of exposing both aggregated 
weights and counts, so it would provide the foundation needed to support 
average aggregations.
 # I ran into some issues with "min" due to lots of assumptions being made in 
taxonomy/aggregation faceting that weights are all positive. This got me 
thinking that "min" aggregation might not be particularly useful.

I think "max" on its own is pretty useful. "Sum" aggregations can be heavily 
influenced by "long tail" effects where lots of matching documents with low 
weights end up dominating. "Max" has the nice property of removing this "long 
tail" effect in some situations (i.e., a facet value is only as good as its 
most highest weight document).

> Support alternate aggregation functions in association facets
> -------------------------------------------------------------
>
>                 Key: LUCENE-10444
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10444
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Greg Miller
>            Assignee: Greg Miller
>            Priority: Minor
>
> We currently only support {{sum}} aggregations in the various association 
> facet implementations. I'd be really interested in extending the association 
> facet implementations to support other aggregations, starting with {{max}} 
> and {{min}} (in addition to {{{}sum{}}}). 
> I've been sketching up a prototype of this and I think I have a reasonable 
> way to introduce this idea. Will get a PR out for feedback soon.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to