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 6ED479B07 for ; Mon, 3 Sep 2012 14:36:37 +0000 (UTC) Received: (qmail 9156 invoked by uid 500); 3 Sep 2012 14:36:34 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 9111 invoked by uid 500); 3 Sep 2012 14:36:34 -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 9102 invoked by uid 99); 3 Sep 2012 14:36:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2012 14:36:33 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FSL_RCVD_USER,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of ramzi.alqrainy@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Sep 2012 14:36:27 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1T8Xl0-0000k5-QY for solr-user@lucene.apache.org; Mon, 03 Sep 2012 07:36:06 -0700 Date: Mon, 3 Sep 2012 07:36:06 -0700 (PDT) From: Ramzi Alqrainy To: solr-user@lucene.apache.org Message-ID: <1346682966360-4005059.post@n3.nabble.com> Subject: Missing Features - AndMaybe and Otherwise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I would like to help me for certain problem. I have encountered a problem i= n task I think if you implement the below functions/conditions, you will help us for many issues. =20 *AndMaybe(a, b)* Binary query takes results from the first query. If and only if the same document also appears in the results from the second query, the score from the second query will be added to the score from the first query. *Otherwise(a, b)* A binary query that only matches the second clause if the first clause doesn=E2=80=99t match any documents. My problem is : I have documents and I do group by on certain field (e.g. Field1). I want to get documents with Field2 is [3 or 9 or 12] if exist, otherwise get any document. please see the below example. D1 : ----------- Field1 : 1 - Field2 : 3 ---------> D1 (group by on field1 and field2 is 3) - D2: ----------- Field1 : 1 Field2 : 4 D3: ----------- Field1 : 2 - Field2 : 5 --------------> any document D3 or D4 - D4: ----------- Field1 : 2 Field2 : 7 I want to get the results like below=20 D1(Mandatory)=20 (D3 OR D4) -- View this message in context: http://lucene.472066.n3.nabble.com/Missing-Fe= atures-AndMaybe-and-Otherwise-tp4005059.html Sent from the Solr - User mailing list archive at Nabble.com.