Shradha26 commented on issue #12553:
URL: https://github.com/apache/lucene/issues/12553#issuecomment-1741079621

   Thanks, Mike!
   > What do you mean by an aggregation group? Is this like counting documents 
that are either red or blue?
   
   Yes, exactly.
   
   > Do we need to do the low-level changes to support these new user features?
   
   For some of the ideas in here, yes. For example, the idea about support 
adding data for groups (ordinals) would require us to add some [new behaviours 
for the taxonomy index](https://github.com/apache/lucene/pull/12337) - 
especially around updates to the index. I've also mentioned how Faceting 
implementations currently are not generic in that any improvement to 
IntTaxonomyFacets has to be reimplemented for FloatTaxonomyFacets.
   
   As for the new features, it may be tricky to implement them over the 
existing Faceting implementation because it would require changing some 
assumptions. For an aggregation, I think we'll want to implement two concepts - 
an `accumulator` - where we keep a record of the running value for an 
aggregation & a `reducer` - which modifies the accumulator. In Lucene's 
faceting, an accumulator doesn't exist as a first class object; rather it is a 
feature of a class that performs the aggregation. This makes it difficult to 
define new aggregations - for example, Lucene's accumulators are defined in 
each aggregator class (this is any concrete child of `Facets` class) and assume 
there's only one value per-label, per-aggregation - like sum/count. But if were 
to implement other aggregations like average or median, we'd want to maintain 
multiple values per accumulator and then finally collapse them in some manner. 
Right now, we'd need to implement a new child of the `Facets` class, which 
doesn't 
 isolate the reduction behaviour or allow generic accumulators to be passed in.
   
   >  I wonder if we could organize them into a plan with dependencies and 
priorities.
   
   Yes, I think that's a great idea. I'll try to organise the ideas in a 
dependency graph.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to