I used the class TermDocs to have the <freq,doc (a number)> of a term.
I would like to retrieve the <freq,Document > of a term.
Any Ideas?
Thanks.
Here you are my code:
// Create an IndexReader on a specific Directory
Directory directory = FSDirectory.getDirectory(lucenePathIndex,false);
IndexReader reader = IndexReader.open(directory);
// Enumeration of all the terms of the lucene files
TermEnum enum = reader.terms();
while (enum.next()){
Term term = enum.term();
// Return the object that contains the document number and the frequence of the term in the doc
TermDocs termDocs = reader.termDocs(term);
}
