Dear, I've made through the demo code for grouping search using TermFirstPassGroupingCollector and TermSecondPassGroupingCollector. However, the sorting of resulted groups is determined by the scores of the top-one documents in each group. ( Everyone of these documents has the highest score in its own group, that's why it is on top ). This way of sorting is also thus described in the grouping documentation.
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. There is an 'Enum TopGroups.ScoreMergeMode' in the org.apache.lucene.search. grouping 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. Btw, I just downloaded the very new Lucene 410 version, so 410v is what I'm looking at. Many thanks in advance! Oliver Oliver Xu(徐永) Aigine InfoTech Co.(语擎科技) MSN: oliver_xuy...@msn.com Weibo: 语擎-集体智慧编程 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org