Erik
Thanks for the quick response.  I don't necessarily need to calculated the 
similarity score. It was my understanding that the inverted index had a list of 
all the hits for each term so technically, no document returned from the 
inverted index should have a score of 0.  Thus, if I have some numerical field 
to sort by, the inverted index itself handles returning the documents with the 
term.
 
Would you know in what java class the call is made to Similarity and where that 
code may be commented out, or would it be preferable to write my own similarity 
sub-class instead?
 
Thanks,
Yin
 

________________________________

From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Sat 11/27/2004 4:43 AM
To: Lucene Users List
Subject: Re: Are similarity scores computed when using sort?



Yes, Similarity is still computed.  It has to be in order to determine
if the documents considered are a hit or not.  Scores of 0 are not a
hit.

You certainly could simplify the Similarity computations though, by
creating your own implementation and returning 1 from all the methods.

        Erik

On Nov 27, 2004, at 2:46 AM, Aphinyanaphongs, Yindalon wrote:

> I have an search application that is very performance conscious.  I've
> looked through the IndexSearcher code, and haven't been able to
> clarify whether a similarity score is calculated if the results are
> sorted by some numerical field value? Basically, it would be
> preferable to not incur the computational cost of generating a
> similarity score if it is never used.
>
> Thanks
> Yin
>


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



Reply via email to