: I believe I do use the index number for the explain(), here is the code:
You are missing Erik's point, he's telling you "do NOT pass the index" ... passing the doc id is the correct way to use explain. try... System.out.println( searcher.explain(query, hits.id(i))); : for (int i = 0; i < hits.length() && i<200; i++) { : System.out.println(); : System.out.println( i+": "+hits.score(i)+": : "+hits.doc(i).get("Title")+ ": "+hits.doc(i).get("SubTitle") ); : System.out.println( searcher.explain(query, i)); : } : I would be very thankful for an explanation since I'm feeling quite lost. : : : -----Original Message----- : From: Erik Hatcher [mailto:[EMAIL PROTECTED] : Sent: Tuesday, May 24, 2005 5:28 PM : To: java-user@lucene.apache.org : Subject: Re: tf=0 while lucene is finding matches? : : : My hunch is that you're not using the document id in your calls to : IndexSearcher.explain(). You don't pass the hit index number. : : Erik : : : On May 24, 2005, at 11:13 AM, M. Mokotov wrote: : : > OK, I think I'm missing something big time... : > Can someone point me to the documentation of the explain? : > : > Thanks a lot, : > M : > : > -----Original Message----- : > From: M. Mokotov [mailto:[EMAIL PROTECTED] : > Sent: Tuesday, May 24, 2005 4:46 PM : > To: 'java-user@lucene.apache.org' : > Subject: tf=0 while lucene is finding matches? : > : > : > Hi, : > : > Anyone knows what is exactly Similarity.tf()? : > I understood it's term frequency on a document. : > Still, when I'm searching for a string a document contains, and the : > Explain().toString() shows tf=0. : > : > : > search string: "SubTitle:(Without)" : > matching documents: 3 : > : > 0: 1.0: "Dropping Out," Drifting Off, Being Excluded: Becoming : > Somebody : > Without School : > 0.0 = fieldWeight(SubTitle:without in 0), product of: : > 0.0 = tf(termFreq(SubTitle:without)=0) : > 7.214108 = idf(docFreq=3) : > 0.5 = fieldNorm(field=SubTitle, doc=0) : > : > : > : > 1: 0.625: "I Have A Life" Bride's Guide: Plan The Wedding You've : > Always : > Wanted--without Losing Your Mind : > 0.0 = fieldWeight(SubTitle:without in 1), product of: : > 0.0 = tf(termFreq(SubTitle:without)=0) : > 7.214108 = idf(docFreq=3) : > 7.5161928E9 = fieldNorm(field=SubTitle, doc=1) : > : > : > 2: 0.625: 1 Microsoft Way: A Cookbook to Breaking Bill Gates Windows : > Monopoly Without Breaking Windows : > 0.0 = fieldWeight(SubTitle:without in 2), product of: : > 0.0 = tf(termFreq(SubTitle:without)=0) : > 7.214108 = idf(docFreq=3) : > 7.5161928E9 = fieldNorm(field=SubTitle, doc=2) : > : > : > : : : --------------------------------------------------------------------- : To unsubscribe, e-mail: [EMAIL PROTECTED] : For additional commands, e-mail: [EMAIL PROTECTED] : : : : --------------------------------------------------------------------- : To unsubscribe, e-mail: [EMAIL PROTECTED] : For additional commands, e-mail: [EMAIL PROTECTED] : -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]