lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn v Groningen <>
Subject Re: About the Sorting of Groups during Grouping by
Date Mon, 11 Feb 2013 19:29:05 GMT

My purpose is trying to sort the groups based on some way of aggregation
> values of the scores of all the documents in each group, such as their sums
> or averages.
At the moment this isn't possible out of the box. You could implement your
collector that collects these statistics per group. Embed the the result in
a FieldComparator
that you use as custom sort in the TermFirstPassGroupingCollector. But this
is just a wild idea.

> There is an 'Enum TopGroups.ScoreMergeMode' in the
> package with the description as "How the
> GroupDocs score (if any) should be merged." Is it exactly introduced for
> the
> purpose above? If yes, how to included it into the grouping code? A demo
> code would be perfect.
The enum is actually only used by the join module
The enum controls how the block join group scores are aggregated during a
distributed search.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message