> I found out how to determine the number of documents in which a term
> appeared by looking at the Luke code, but how does one determine the
> number of times it occurs in each document?

Use TermDocs -
http://lucene.apache.org/java/docs/api/org/apache/lucene/index/TermDocs.html
Something like -
 TermDocs td = myIndexReader.termDocs(new Term("name1","value1"));
 while (td.next()) {
   System.out.println("term frequency in doc "+td.doc()+" is: "+
td.freq());
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to