lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vermansi <>
Subject Find term frequency of a word in a document
Date Sun, 06 Feb 2011 14:42:07 GMT

I wish to re-rank top 3000 documents fetched after searching for a query. To
re-rank them I need to find out the term frequencies of some words in each
document. I have looked into termFreqVector. The problem is that i will need
access this class for every document. And then find the index of the word,
get the frequencies of all words in document and then access the frequency
at the index of the word. This will take a lot of time for 3000 documents
and I have 1000 such queries which will make it even more complicated. 
Is there a direct way to access the frequency of a word in document ? ..
Example word --> w1, document --> d1 
I want the frequency of w1 in d1. Is it possible to do it without using
TermFreqVector ? 

View this message in context:
Sent from the Lucene - General mailing list archive at

View raw message