Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 29238 invoked from network); 3 Mar 2009 20:31:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2009 20:31:15 -0000 Received: (qmail 78042 invoked by uid 500); 3 Mar 2009 20:31:07 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 78008 invoked by uid 500); 3 Mar 2009 20:31:07 -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 77997 invoked by uid 99); 3 Mar 2009 20:31:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2009 12:31:06 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 74.125.44.28 as permitted sender) Received: from [74.125.44.28] (HELO yx-out-2324.google.com) (74.125.44.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2009 20:31:00 +0000 Received: by yx-out-2324.google.com with SMTP id 31so1575143yxl.5 for ; Tue, 03 Mar 2009 12:30:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=NYjUf5oFHQf1nNbLpxOHC0ndT5gw2CpbaKH0RqYUm7c=; b=kMUmzNtG53POxNPBySxFrWOPit9BLu63sHU5gGAPBjg7YEaXLPg7dFO9kZB82pgi2n ZurD0+jx2n5w21EWFNytLb2WXYg12z2WeAb8Mf8Jd3+SGqxjpdCjEV7j0CghPVxumrzt wz9u8NcjpMXKHFzKjiOtP+rPrHNrDiitn8PUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=plx+LkmbQPV9XJM4AyXw9KqctOlc9u2jkYJ+UCMMLPXUuQVd2GeJFvA8SfARSNys61 VKFeR8/1XPnknlmbEYfm28/HUNagKPWnm5t5wrIGLOxaRUTHoeR2Dbsi9KqbqZFDWYb/ tzl6lkKtmOtWxzGZFkhwnKODyuFjkxwxLBtKY= MIME-Version: 1.0 Received: by 10.220.99.6 with SMTP id s6mr2573558vcn.96.1236112238944; Tue, 03 Mar 2009 12:30:38 -0800 (PST) In-Reply-To: <4014d98b0903031018k6ef40b7dl772e7386ea3fae06@mail.gmail.com> References: <4014d98b0903030904x7a72e5a9s2272558097a67db1@mail.gmail.com> <2D127F11DC79714E9B6A43AC9458147F13FCA24E@suex07-mbx-03.ad.syr.edu> <4014d98b0903031018m29253993w490de9c7474e2718@mail.gmail.com> <4014d98b0903031018k6ef40b7dl772e7386ea3fae06@mail.gmail.com> Date: Tue, 3 Mar 2009 15:30:38 -0500 Message-ID: <359a92830903031230q3a50d591v5989d97c400bec85@mail.gmail.com> Subject: Re: Why do range queries work on fields only ? From: Erick Erickson To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e64755a4e7a38104643ccecc X-Virus-Checked: Checked by ClamAV on apache.org --0016e64755a4e7a38104643ccecc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable But it's still not clear what the semantics of your search are. Do you mean "I want index04, index05, index06, index07 and index08 to appear in that order in the field"? If so you can use one of the SpanQuery family, specifying a large slop and respecting order. But this could get clumsy with large numbers of terms. If you mean "at least one of index04...08 in the field" that's just an OR clause. Best Erick On Tue, Mar 3, 2009 at 1:18 PM, Raymond Balm=E8s = wrote: > sorry [index04 TO index 08] > > On Tue, Mar 3, 2009 at 7:18 PM, Raymond Balm=E8s >wrote: > > > Just a simplified view of my problem : > > > > A document contains the terms "index01 blabla index02 xxx yyy index03 .= .. > > index10". I have the terms indexed in the collection. > > I now want to look for documents which contains [page04 TO page08]... > looks > > like I can't do it > > -RB- > > On Tue, Mar 3, 2009 at 6:33 PM, Steven A Rowe wrote: > > > >> Hi Raymond, > >> > >> On 3/3/2009 at 12:04 PM, Raymond Balm=E8s wrote: > >> > The range query only works on fields (using a string compare)... is > >> > there any reason why it is not possible on the words of the document= . > >> > > >> > The following query [stringa TO stringb] would just give the list o= f > >> > documents which contains words between those two strings. > >> > >> Can you give an example of what you want to do? > >> > >> I suspect what you want is to look at a range of terms that appear in > the > >> collection (that is, across all documents) - if this is so, then you m= ay > be > >> interested in IndexReader.terms(Term): > >> > >> > >> > http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/index/IndexRead= er.html#terms(org.apache.lucene.index.Term) > >> > >> Steve > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > >> For additional commands, e-mail: java-user-help@lucene.apache.org > >> > >> > > > --0016e64755a4e7a38104643ccecc--