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.
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-64