Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0285EDF95 for ; Sat, 5 Jan 2013 13:24:27 +0000 (UTC) Received: (qmail 774 invoked by uid 500); 5 Jan 2013 13:24:24 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 713 invoked by uid 500); 5 Jan 2013 13:24:24 -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 357 invoked by uid 99); 5 Jan 2013 13:24:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2013 13:24:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.210.53] (HELO mail-da0-f53.google.com) (209.85.210.53) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2013 13:24:13 +0000 Received: by mail-da0-f53.google.com with SMTP id x6so7917741dac.40 for ; Sat, 05 Jan 2013 05:23:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding:x-gm-message-state; bh=eA2AZOBo6SfjZXRlWMIdVvhuRtZUdhi1Z09itZlU9og=; b=f4T/IPrqdHWReAGz5xHYZvOoCMVglBW8+z5u8pNGj6IXnrjCDBCwJz5XsSR8/UHJ/h hvY4fEMxgI7cx+YAwsKkkra1JtrMd5lU5ytP6LX/bu0rr2bKOnXi2hok0qOvI8YWYAJt HL16fGT3Lj6/Bwtvt2tYT+s9qNkkDKn8FOFRBB1kynhgvQvE11F+bcB6b3cbjGJ3Ouwe vnltggK/H8Wbb/FebWWw6j/XU7pIqxvUlroLB+u2JIOH5ZV+E7KVG6NfSTMkd0vPm3jk Jsw30IXa5dygHZv9EUpaxVt64ctOp984UVHIpKgUhYm6oUH4eEl9Z769IYA7klrR3/CB RKEA== Received: by 10.68.135.98 with SMTP id pr2mr5079687pbb.101.1357392231929; Sat, 05 Jan 2013 05:23:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.34.106 with HTTP; Sat, 5 Jan 2013 05:23:31 -0800 (PST) In-Reply-To: References: From: Michael McCandless Date: Sat, 5 Jan 2013 08:23:31 -0500 Message-ID: Subject: Re: Terms.getSumTotalTermFreq() in Lucene 4.0 To: java-user@lucene.apache.org Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQk1yEn3kIJUMUNGcEEJPE7LeUHgfrqxnCmud6TPoHj1HsxAivtWPyVceZJpT/tskW5ekeDW X-Virus-Checked: Checked by ClamAV on apache.org Hi, The next version won't have a fix for this unless someone opens an issue / posts a patch. Mike McCandless http://blog.mikemccandless.com On Fri, Jan 4, 2013 at 7:59 PM, =C0=E5=BF=EB=BC=AE wro= te: > Hello Mike. > Thanks for your reply. > > It's not an important issue. > I'll waiting for next release version including this patch. > > Thanks. > > 2013/1/4 Michael McCandless > >> The problem is that the TermVectorsFormat for the default codec >> (Lucene40TermVectorsFormat) does not store this statistic >> per-document, currently. We could in theory fix this ... maybe open >> an issue / make a patch if it's important? >> >> -1 return value is actually "valid": it means this statistic is not >> available. >> >> Mike McCandless >> >> http://blog.mikemccandless.com >> >> On Fri, Jan 4, 2013 at 2:39 AM, =C0=E5=BF=EB=BC=AE = wrote: >> > Hello. >> > I have some questions. >> > >> > Document 1 : "learning perl learning java learning ruby" >> > Document 2 : "perl test" >> > >> > I have indexed this documents, with StoreTermVectors(true) and >> > IndexOptions.DOCS_AND_FREQS. >> > Field name is "f". >> > >> > And I executed this code. >> > >> > IndexReader ir =3D IndexReader.open(dir); >> > Terms terms =3D ir.getTermVector(0, "f"); >> > >> > System.out.println(terms.getDocCount()); -> 1 >> > System.out.println(terms.getSumDocFreq()); -> 4 >> > System.out.println(terms.getSumTotalTermFreq()); -> -1 >> > >> > I think this terms instance acts like a single-document inverted index= . >> > >> > So getDocCount is 1 (single document), and getSumDocFreq is 4. (becaus= e >> > each term's docFreq is 1) >> > Is this right? >> > >> > But I can't understand why getSumTotalTermFreq method return -1. >> > In javadoc getSumTotalTermFreq is sum of >> > >> TermsEnum.totalTermFreq >> > . >> > >> > I think in Document1, each term's totalTermFreqs are [learning, 3], >> [java, >> > 1], [perl, 1], [ruby, 1]. >> > So getSumTotalTermFreq method's result is 6 not -1. >> > >> > Why temrs.getSumTotalTermFreq() method return -1? >> > >> > >> > Thanks in advance. >> > -- >> > DEV=BF=EB=BD=C4 >> > http://devyongsik.tistory.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> > > > -- > DEV=BF=EB=BD=C4 > http://devyongsik.tistory.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org