lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Lust <>
Subject TermDocs
Date Tue, 24 Feb 2004 16:02:18 GMT

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?


Here you are my code:

  // Create an IndexReader on a specific Directory
Directory directory = FSDirectory.getDirectory(lucenePathIndex,false);
IndexReader reader =;
// Enumeration of all the terms of the lucene files
TermEnum enum = reader.terms();
while ({
	          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);
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message