lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: about to get
Date Thu, 17 May 2007 11:43:40 GMT
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
>
> 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/ 
LuceneFAQ



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message