0
votes

I have implemented a word cloud through Lucene 4.0.0 calling the method getHighFreqTerms() as follows

TermStats[] termStats = HighFreqTerms.getHighFreqTerms(ir, HITS, "content");

I am trying to find a way to get the origin of each term. Is this possible? What do I need to do? I thought of a solution which is to get a frequency value per term per document while at the same time storing in a HashMap the term and as a value an ArrayList with each of the documents, but I firmly believe this is inefficient.

Have you got any suggestions?

Thank you very much,

1
Don't you really want to use an IndexSearcher to get documents? - NicholasKarl
I really don't know..Do you think this is the best solution? I am thinking about the slow response I am going to get if I follow this approach. - user2008973

1 Answers

0
votes

HighFreqTerms only gives you information about the index. If you want documents you have to use a query.