Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A0FB68CE for ; Wed, 13 Jul 2011 01:36:37 +0000 (UTC) Received: (qmail 32748 invoked by uid 500); 13 Jul 2011 01:36:34 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 32659 invoked by uid 500); 13 Jul 2011 01:36:33 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 32649 invoked by uid 99); 13 Jul 2011 01:36:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 01:36:33 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FREEMAIL_FROM,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of cameron.developer@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 01:36:27 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QgoMw-0005kD-DR for solr-user@lucene.apache.org; Tue, 12 Jul 2011 18:36:06 -0700 Date: Tue, 12 Jul 2011 18:36:06 -0700 (PDT) From: entdeveloper To: solr-user@lucene.apache.org Message-ID: <1310520966408-3164433.post@n3.nabble.com> Subject: Grouping / Collapse Query MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm messing around with the field collapsing in 4.x http://wiki.apache.org/solr/FieldCollapsing . Is it currently possible to group by a field with a certain value only and leave all the others ungrouped using the group.query param? This currently doesn't seem to work the way I want it to. For example, I have documents all with a "type" field. Possible values are: picture, video, game, other. I want to only group the pictures, and leave all other documents ungrouped. If I query something like: q=dogs&group=true&group.query=type:picture I ONLY get pictures back. Seems like this behaves more like an 'fq' What I want is a result set that looks like this: 1. doc 1, type=video 2. doc 2, type=game 3. doc 3, type=picture, + 3 other pictures 4. doc 4, type=video 5. doc 5, type=video ... I've also tried: q=dogs&group=true&group.query=type:picture&group.query=-type:video -type:game But this doesn't work because the order of the groups don't put together the correct order of results that would be displayed. -- View this message in context: http://lucene.472066.n3.nabble.com/Grouping-Collapse-Query-tp3164433p3164433.html Sent from the Solr - User mailing list archive at Nabble.com.