counting the word frequency in lucene index

Ehsan picture Ehsan · Nov 12, 2010 · Viewed 11.8k times · Source

Can someone help me finding the word frequency in all lucene index
for example if doc A has 3 number of word (B) and doc C has 2 of them, I'd like a method to return 5 showing the frequency of word (B) in all lucene index