Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B41759CD1 for ; Mon, 5 Mar 2012 14:36:19 +0000 (UTC) Received: (qmail 35651 invoked by uid 500); 5 Mar 2012 14:36:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 35596 invoked by uid 500); 5 Mar 2012 14:36:18 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 35589 invoked by uid 99); 5 Mar 2012 14:36:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 14:36:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 14:36:17 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 357AA96F7 for ; Mon, 5 Mar 2012 14:35:57 +0000 (UTC) Date: Mon, 5 Mar 2012 14:35:57 +0000 (UTC) From: "Martijn van Groningen (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <212897094.22482.1330958157220.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <637453396.35862.1329212639489.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3778) Create a grouping convenience class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222368#comment-13222368 ] Martijn van Groningen commented on LUCENE-3778: ----------------------------------------------- {quote} One can actually use GroupingSearch in a shard'd env, on each shard, right? It's just that then you merge them like normal on the front end (ie, TopGroups.merge). Is that the only reason for the "... in a non distributed environment" javadoc warning? {quote} In a sharded env one needs to first execute all the first pass collector on all shards, merge the returned search groups, execute the second pass search (with the top N merged search groups as argument) on most of the shards and finally merge the TopGroups from all shards into a topN TopGroups. Also grouping by docblock and grouping features like allGroups and groupHead don't work in a normal sharded environment (unless you partition the groups properly). The docs caching also only makes sense when performing grouping on a local index. This usage is very different then non distributed grouping, that is why I think it is better to have a separate grouping convenience class for distributed grouping (DistributedGroupSearch?). bq. Maybe the ctor should take docValuesType / diskResidentValues Makes sense! bq. Maybe you should pass the groupSort, groupsOffset, groupsLimit to the search method (instead of setters)? Maybe we just should have defaults for these options? Sort.RELEVANCE, 0 and 10? > Create a grouping convenience class > ----------------------------------- > > Key: LUCENE-3778 > URL: https://issues.apache.org/jira/browse/LUCENE-3778 > Project: Lucene - Java > Issue Type: Improvement > Components: modules/grouping > Reporter: Martijn van Groningen > Attachments: LUCENE-3778.patch > > > Currently the grouping module has many collector classes with a lot of different options per class. I think it would be a good idea to have a GroupUtil (Or another name?) convenience class. I think this could be a builder, because of the many options (sort,sortWithinGroup,groupOffset,groupCount and more) and implementations (term/dv/function) grouping has. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org