You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Aphinyanaphongs, Yindalon" <pi...@Vanderbilt.Edu> on 2004/11/27 08:46:55 UTC
Are similarity scores computed when using sort?
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
Re: Are similarity scores computed when using sort?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
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: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org