lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Lust <dl...@denali.be>
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?

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);
}
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message