Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 10112 invoked from network); 11 Oct 2005 20:12:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Oct 2005 20:12:51 -0000 Received: (qmail 57108 invoked by uid 500); 11 Oct 2005 20:12:38 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 56917 invoked by uid 500); 11 Oct 2005 20:12:37 -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 56819 invoked by uid 99); 11 Oct 2005 20:12:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 13:12:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [128.59.29.6] (HELO serrano.cc.columbia.edu) (128.59.29.6) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2005 13:12:38 -0700 Received: from [156.145.29.81] ([156.145.29.81]) (user=mh2371 mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.13.0/8.13.0) with ESMTP id j9BKCBb8026447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 11 Oct 2005 16:12:12 -0400 (EDT) Message-ID: <434C1C9B.4090801@animarc.com> Date: Tue, 11 Oct 2005 16:12:11 -0400 From: Marc Hadfield User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: query across fields? References: <434AD09E.6050307@animarc.com> <434AD294.3010306@apache.org> <434AD82C.8000106@animarc.com> <434AE852.2010807@apache.org> <434C0488.1000802@animarc.com> <434C0CF5.2070404@apache.org> In-Reply-To: <434C0CF5.2070404@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.48 on 128.59.29.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N thanks again! Doug Cutting wrote: > Marc Hadfield wrote: > >> In the SpanNear (or for that matter PhraseQuery), one can set a slop >> value where 0 (zero) means one following after the other. >> >> How can one differentiate between Terms at the **same** position vs. >> one after the other? > > > The following queries only match "x" and "y" at the same position: > > Query pq = new PhraseQuery(); > pq.add(new Term("f", "x"), 0); > pq.add(new Term("f", "y"), 0); > > Query sq = > new SpanNearQuery(new SpanQuery[] > { new SpanTermQuery(new Term("f", "x")), > new SpanTermQuery(new Term("f", "y")) }, > 0, false); > > Doug > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org