Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 16813 invoked from network); 27 May 2006 13:02:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 May 2006 13:02:40 -0000 Received: (qmail 13808 invoked by uid 500); 27 May 2006 13:02:37 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 12892 invoked by uid 500); 27 May 2006 13:02:34 -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 12881 invoked by uid 99); 27 May 2006 13:02:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 May 2006 06:02:34 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.109.24.28] (HELO smtp-vbr8.xs4all.nl) (194.109.24.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 May 2006 06:02:33 -0700 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr8.xs4all.nl (8.13.6/8.13.6) with ESMTP id k4RD2BTe053112 for ; Sat, 27 May 2006 15:02:12 +0200 (CEST) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: java-user@lucene.apache.org Subject: Re: BufferedIndexInput.readByte performance; Spans not unique Date: Sat, 27 May 2006 15:02:11 +0200 User-Agent: KMail/1.8.2 References: <429c032d0605260714p69ad26a2n1cfae95724bf866d@mail.gmail.com> <200605261826.37597.paul.elschot@xs4all.nl> <429c032d0605270439r329abfc8l468dd467ee8084e0@mail.gmail.com> In-Reply-To: <429c032d0605270439r329abfc8l468dd467ee8084e0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605271502.11447.paul.elschot@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Saturday 27 May 2006 13:39, Michael Chan wrote: > > A few things might help: > > - use getSpans() on the scorer of the query, iterate the resulting Spans > > and count the number of different doc values. > > This saves the scoring and the sorting on score value. > > Thanks for your advice. I was wondering, is each span given by > getSpans() a unique match according to the given query? Not always: it is possible for different terms to be indexed in the same position, and it is also possible to create a SpanOrQuery in which the same Span(Term)Query occurs more than once. The spans will be ordered, so in case they are not unique, the ones with the same begin/end positions in the same doc will be consecutive. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org