lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Mokotov" ...@mokotov.org>
Subject RE: tf=0 while lucene is finding matches?
Date Wed, 25 May 2005 07:27:57 GMT
Hi Erik
Thanks for the response.

I believe I do use the index number for the explain(), here is the code:


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:erik@ehatchersolutions.com] 
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:mk@mokotov.org]
> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message