Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 31551 invoked from network); 16 Nov 2005 20:20:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Nov 2005 20:20:00 -0000 Received: (qmail 50636 invoked by uid 500); 16 Nov 2005 20:19:54 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 50604 invoked by uid 500); 16 Nov 2005 20:19:54 -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 50593 invoked by uid 99); 16 Nov 2005 20:19:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2005 12:19:54 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_00_10,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gregak@gmail.com designates 64.233.184.206 as permitted sender) Received: from [64.233.184.206] (HELO wproxy.gmail.com) (64.233.184.206) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2005 12:21:28 -0800 Received: by wproxy.gmail.com with SMTP id i14so1799060wra for ; Wed, 16 Nov 2005 12:19:33 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=TMlNDr/14NyShIG+cplR0tEkw8TAYdmegv+Kj/FwtXo2vlma0IbnTZX4zWeCn7LpS6B9XZe87njLjRfTZuSX/1OtNecHAevvfRIwH9M6Dk8unFpPz8GdTNBfrIPnaOSAG2+KiUd+SSwnEVhFniH9H7xLastSIwFzDyMndhIltJQ= Received: by 10.54.157.8 with SMTP id f8mr4837427wre; Wed, 16 Nov 2005 12:19:33 -0800 (PST) Received: by 10.54.154.5 with HTTP; Wed, 16 Nov 2005 12:19:33 -0800 (PST) Message-ID: Date: Wed, 16 Nov 2005 12:19:33 -0800 From: Greg K To: java-user@lucene.apache.org Subject: Filtering on a SpanQuery without losing spans MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5991_26102680.1132172373088" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5991_26102680.1132172373088 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi All, I'm using a bunch of SpanNearQueries combined in a SpanOrQuery to do a set of searches matches a phrase with a prefix search at the end. I.e. "phrase with prefix s*" kind of thing that matches "phrase with prefix search" and "phrase with prefix string". It works great and lets me quickly produce excerpts with the spans that I get via getSpans. Now, however, I'd like to be able restrict the search to certain documents in the index, so I don't have to stream through a couple of thousand spans to produce the 10 excerpts on a subset of the documents. I've tried added a term to the SpanNearQueries that targets a keyword field containing the document ids, but SNQ (understandably) can't handle that. There isn't a SpanBooleanQuery and if I wrap the SpanOrQuery in a BooleanQuery I'll lose access to the getSpans() method - same if I use a Filter - can't get spans out of a Hits object, right? Am I missing something? Is there a straightforward way to do what I'm tryin= g to do that I'm missing? Thanks, Greg ------=_Part_5991_26102680.1132172373088--