You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Tom Burton-West <tb...@umich.edu> on 2013/03/04 21:48:40 UTC

Re: 答复: About the Sorting of Groups during Grouping by

Hello Oliver,

We are very interested in group sorting based on some aggregation function
also. Would you consider contributing your code to Lucene, or posting your
results?

Tom

Tom Burton-West
Information Retrieval Programmer
Digital Library Production Service
University of Michigan Library
http://www.hathitrust.org/blogs/large-scale-search



On Mon, Feb 11, 2013 at 3:55 PM, Oliver Xu <ol...@gmail.com> wrote:

> Right. I understand that the TermFirstPassGroupingCollector is extended
> from
> Collector class too. Let me try.
>
> Many thanks to you!
>
> -----邮件原件-----
> 发件人: martijn.is.hier@gmail.com [mailto:martijn.is.hier@gmail.com] 代表
> Martijn v Groningen
> 发送时间: 2013年2月11日 19:29
> 收件人: java-user@lucene.apache.org
> 主题: Re: About the Sorting of Groups during Grouping by
>
> Hi,
>
> 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
> own
> 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
> > 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.
> >
> The enum is actually only used by the join module
> (ToParentBlockJoinCollector).
> The enum controls how the block join group scores are aggregated during a
> distributed search.
>
> Martijn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>