Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 9601 invoked from network); 17 May 2007 11:44:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 May 2007 11:44:10 -0000 Received: (qmail 62221 invoked by uid 500); 17 May 2007 11:44:08 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 62185 invoked by uid 500); 17 May 2007 11:44:08 -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 62174 invoked by uid 99); 17 May 2007 11:44:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2007 04:44:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [208.97.132.202] (HELO spunkymail-a12.g.dreamhost.com) (208.97.132.202) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2007 04:44:01 -0700 Received: from [192.168.0.2] (adsl-074-229-189-244.sip.rmo.bellsouth.net [74.229.189.244]) by spunkymail-a12.g.dreamhost.com (Postfix) with ESMTP id 26C097FA7 for ; Thu, 17 May 2007 04:43:40 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <28C622BA8A7A474589924466E6303BE00CC495@EXCH01.yikey.com> References: <28C622BA8A7A474589924466E6303BE00CC495@EXCH01.yikey.com> Content-Type: text/plain; charset=GB2312; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Grant Ingersoll Subject: Re: about to get Date: Thu, 17 May 2007 07:43:40 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org You can get it from a Hits object (see the id() method) or you can =20 iterate over the docs from 0 to maxDoc -1 (skipping deleted docs) I have some code at http://www.cnlp.org/apachecon2005/ that shows =20 various usages for Term Vector. The Lucene in Action book has some =20 good examples as well. -Grant On May 17, 2007, at 6:10 AM, =CD=AF=D0=A1=BE=FC wrote: > Hi lucener: > > I am want get the TermFreqVector =A1=A3but I must get docNum first. > > titleVector =3D reader.getTermFreqVector(docNum, "title"); > > > > but I can=A1=AFt get Docnum by lucene Document. > > how can I get the docNum use Document object? > > Like this getTermFreqVector(doc,=A1=B1title=A1=B1); > > > > xiaojun tong > > > > 010-64489518-613 > > tongxiaojun@msn.com > > www.feedsky.com > > > -------------------------- Grant Ingersoll Center for Natural Language Processing http://www.cnlp.org/tech/lucene.asp Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/=20 LuceneFAQ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org