You can get it from a Hits object (see the id() method) or you can
iterate over the docs from 0 to maxDoc -1 (skipping deleted docs)
I have some code at http://www.cnlp.org/apachecon2005/ that shows
various usages for Term Vector. The Lucene in Action book has some
good examples as well.
-Grant
On May 17, 2007, at 6:10 AM, 童小军 wrote:
Hi lucener:
I am want get the TermFreqVector 。but I must get docNum first.
titleVector = reader.getTermFreqVector(docNum, "title");
but I can’t get Docnum by lucene Document.
how can I get the docNum use Document object?
Like this getTermFreqVector(doc,”title”);
xiaojun tong
010-64489518-613
[EMAIL PROTECTED]
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/
LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]