lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: How to construct the term frequency vector of all words in dictionary?
Date Tue, 15 May 2012 18:04:42 GMT
You can get a TermEnum (IndexReader.terms()) and then keep calling
.next() to advance to the next term, and then .docFreq() to get the
document frequency (how many documents have the term) for that term...

Mike McCandless

On Tue, May 15, 2012 at 1:24 PM, Aoi Morida <> wrote:
> Hi all,
> I want to create the term frequency vector for all words in the dictionary.
> I find that the function getTermFreqVector() can only give term frequency of
> the words existed in the particular document.
> BTW, I want to extract words in the dictionary and I find that the function
> getWordsIterator()  can do this. But as I import
>, there is always an error
> message. I wondered what's wrong with it. My lucene version is 2.9.4.
> Thank you.
> Regards,
> Aoi
> --
> View this message in context:
> Sent from the Lucene - General mailing list archive at

View raw message