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 F39FC4B28 for ; Fri, 27 May 2011 02:22:29 +0000 (UTC) Received: (qmail 70090 invoked by uid 500); 27 May 2011 02:22:28 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 70034 invoked by uid 500); 27 May 2011 02:22:28 -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 70021 invoked by uid 99); 27 May 2011 02:22:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2011 02:22:28 +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; Fri, 27 May 2011 02:22:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7622CE173C for ; Fri, 27 May 2011 02:21:47 +0000 (UTC) Date: Fri, 27 May 2011 02:21:47 +0000 (UTC) From: "Bill Bell (JIRA)" To: dev@lucene.apache.org Message-ID: <81600457.47481.1306462907480.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1588338454.13015.1305382307497.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (LUCENE-3097) Post grouping faceting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-3097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040033#comment-13040033 ] Bill Bell edited comment on LUCENE-3097 at 5/27/11 2:19 AM: ------------------------------------------------------------ One way to do this would be to treat each grouping as unique fields. That would solve both use cases: My use case would work for top doc per group, but I can see that the counting looks for "unique values in the field per group". So your example would "look like for counting" for color: {code} name=3-wolf shirt color=red color=blue name=frog shirt color=white color=red {code} color red=2, blue=1, white=1 For size the counting looks like: {code} name=3-wolf shirt size=M, color=red size=S, color=red size=L, color=blue name=frog shirt size=M, color=white size=S, color=red {code} size M=2, S=2, L=1 And the facets for size would not change for: {code} name=3-wolf shirt size=M, color=red size=S, color=red size=L, color=blue size=S, color=blue size=S, color=blue size=L, color=blue name=frog shirt size=M, color=white size=S, color=red {code} Thanks. was (Author: billnbell): One way to do this would be to treat each grouping as unique fields. That would solve both use cases: My use case would work for top doc per group, but I can see that the counting looks for "unique values in the field per group". So your example would "look like for counting" for color: {quote} name=3-wolf shirt color=red color=blue name=frog shirt color=white color=red {quote} color red=2, blue=1, white=1 For size the counting looks like: {quote} name=3-wolf shirt size=M, color=red size=S, color=red size=L, color=blue name=frog shirt size=M, color=white size=S, color=red {quote} size M=2, S=2, L=1 And the facets for size would not change for: {quote} name=3-wolf shirt size=M, color=red size=S, color=red size=L, color=blue size=S, color=blue size=S, color=blue size=L, color=blue name=frog shirt size=M, color=white size=S, color=red {quote} Thanks. > Post grouping faceting > ---------------------- > > Key: LUCENE-3097 > URL: https://issues.apache.org/jira/browse/LUCENE-3097 > Project: Lucene - Java > Issue Type: New Feature > Components: modules/grouping > Reporter: Martijn van Groningen > Assignee: Martijn van Groningen > Priority: Minor > Fix For: 3.2, 4.0 > > Attachments: LUCENE-3097.patch > > > This issues focuses on implementing post grouping faceting. > * How to handle multivalued fields. What field value to show with the facet. > * Where the facet counts should be based on > ** Facet counts can be based on the normal documents. Ungrouped counts. > ** Facet counts can be based on the groups. Grouped counts. > ** Facet counts can be based on the combination of group value and facet value. Matrix counts. > And properly more implementation options. > The first two methods are implemented in the SOLR-236 patch. For the first option it calculates a DocSet based on the individual documents from the query result. For the second option it calculates a DocSet for all the most relevant documents of a group. Once the DocSet is computed the FacetComponent and StatsComponent use one the DocSet to create facets and statistics. > This last one is a bit more complex. I think it is best explained with an example. Lets say we search on travel offers: > |||hotel||departure_airport||duration|| > |Hotel a|AMS|5 > |Hotel a|DUS|10 > |Hotel b|AMS|5 > |Hotel b|AMS|10 > If we group by hotel and have a facet for airport. Most end users expect (according to my experience off course) the following airport facet: > AMS: 2 > DUS: 1 > The above result can't be achieved by the first two methods. You either get counts AMS:3 and DUS:1 or 1 for both airports. -- This message is automatically generated by JIRA. 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