Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 58249 invoked from network); 8 Aug 2006 18:04:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Aug 2006 18:04:25 -0000 Received: (qmail 51477 invoked by uid 500); 8 Aug 2006 18:04:19 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 51446 invoked by uid 500); 8 Aug 2006 18:04:19 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 51435 invoked by uid 99); 8 Aug 2006 18:04:19 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2006 11:04:19 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of yseeley@gmail.com designates 64.233.162.193 as permitted sender) Received: from [64.233.162.193] (HELO nz-out-0102.google.com) (64.233.162.193) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2006 11:04:18 -0700 Received: by nz-out-0102.google.com with SMTP id z6so275062nzd for ; Tue, 08 Aug 2006 11:03:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=o6CQToN/PJVuaGcMRLkP8vuqZyIFX3uFgfG3U+lEbZKNOzv+UZO1jsbCQ4KeQGvSZfa0byMrHdoQwXeUlb1pGeuixZ2dSKaTCfKB8JZU10BVUOg/iMVAYUqOhYHtmRGVibRQyIG4V+hbCDm6nhRbw+L+Gul1RtjP1B1EjYHgNWs= Received: by 10.35.11.15 with SMTP id o15mr15035825pyi; Tue, 08 Aug 2006 11:03:49 -0700 (PDT) Received: by 10.35.11.9 with HTTP; Tue, 8 Aug 2006 11:03:49 -0700 (PDT) Message-ID: Date: Tue, 8 Aug 2006 14:03:49 -0400 From: "Yonik Seeley" Sender: yseeley@gmail.com To: java-user@lucene.apache.org Subject: Re: "Field Grouping" query restrained to same field on a 'multi'-field' In-Reply-To: <44D8BAEA.6010108@netbreeze.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44D8BAEA.6010108@netbreeze.ch> X-Google-Sender-Auth: d5864db079dc959e X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 8/8/06, Laurent Hoss wrote: > Suppose having an Index containing Lucene documents, having multiple > fields (equally) named 'paragraph'. > Now I want to make a "Field Grouping" query (described in: > http://lucene.apache.org/java/docs/queryparsersyntax.html ) > "paragraph:( word1 AND word2 )" > retrieving only documents where the terms word1,word2 appear in the SAME > 'paragraph' Field (and not word1 in one 'paragraph' field, and word2 > possibly in another 'paragraph' field in this doc). You could do this with the current query parser by putting large position increment gaps between paragraphs that is guaranteed to be larger than the largest paragraph. Then you could use a sloppy phrase query "word1 word2"~10000 for instance. That would also score documents higher the closer together the words appeared (which may or may not be desirable). -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org