Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 69485 invoked from network); 29 Sep 2005 15:54:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2005 15:54:02 -0000 Received: (qmail 35900 invoked by uid 500); 29 Sep 2005 15:53:56 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 35873 invoked by uid 500); 29 Sep 2005 15:53:55 -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 35860 invoked by uid 99); 29 Sep 2005 15:53:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 08:53:55 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [129.97.152.11] (HELO services04.student.cs.uwaterloo.ca) (129.97.152.11) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 08:54:00 -0700 Received: from rees.math.uwaterloo.ca (daemon@rees.math.uwaterloo.ca [129.97.204.28]) by services04.student.cs.uwaterloo.ca (8.11.7/8.11.7) with ESMTP id j8TFrSc15365 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO) for ; Thu, 29 Sep 2005 11:53:30 -0400 (EDT) Received: (from pgwillia@localhost) by rees.math.uwaterloo.ca (8.11.7/8.11.7) id j8TFrRG23257; Thu, 29 Sep 2005 11:53:27 -0400 (EDT) Date: Thu, 29 Sep 2005 11:53:27 -0400 (EDT) From: Tricia Williams X-X-Sender: pgwillia@rees.math.uwaterloo.ca To: java-user@lucene.apache.org Subject: TermDocs.freq() In-Reply-To: <433BD00A.4010704@getopt.org> Message-ID: References: <433BC5DB.4010208@eworx.gr> <433BD00A.4010704@getopt.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (services04.student.cs.uwaterloo.ca [129.97.152.11]); Thu, 29 Sep 2005 11:53:30 -0400 (EDT) X-Miltered: at minos with ID 433C0DF9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on localhost X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am finding that TermDocs.freq() method is returning an incorrect value. I was wondering if anyone else had experienced this problem. I am using tp = IndexReader.termPositions( queryTerm ) to return a object which implements TermPositions. I then use tp.skipTo( docid ) to go directly to the document from which I wish to retrieve term positions. The following for loop adds the positions to my ArrayList which I use later: for( int pos = tp.nextPosition(), k = 0; k < tp.freq(); pos = tp.nextPosition(), k++ ) { positionMatches.add( new Integer( pos ) ); } In a document which I know has 48 references to the term, a frequency of 23 is returned. There doesn't seem to be a pattern to this as some other documents have (frequency, actual): (25, 48), (36, 43), (30, 149). These frequencies are from results within my code and confirmed in Luke, so I'm pretty certain that this isn't an error on my part. I've been trying to find out where the origin of this issue is without luck thus far. Any help or advice would be appreciated. Thanks, Tricia --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org