Re: Change default scoring formula

2011-06-01 Thread ngaurav2005
Thanks Tomas. Well I am sorting results by a function query. I donot want
solr to do extra effort in calculating score for each document and eat up my
cpu cycles. Also, I need to use "if" condition in score calculation, which I
emulated through "map" function, but map function do not accept a function
as one of the values. This causes me to write my own scoring algorithm.

Can you help me with the steps or link to any post which explains step by
step overriding(DefaultSimilarity class) default sorting algorithm?

Thanks in advance.
Gaurav


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Change-default-scoring-formula-tp3012196p3012372.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Change default scoring formula

2011-06-01 Thread Tomás Fernández Löbbe
Hi Gaurav, not sure what your use case is (and if no sorting at all is ever
required, is Solr / Lucene what you need?).
You can certainly sort by a field (or more) in descendant or ascendant order
by using the "sort" parameter.
You can customize the scoring algorithm by overriding the DefaultSimilarity
class, but first make sure that this is what you need, as most use cases can
be implemented with the default similarity plus queries / filter queries /
function queries, etc.
Regards,

Tomás
On Wed, Jun 1, 2011 at 4:02 PM, ngaurav2005  wrote:

> Hi All,
>
> I need to change the default scoring formula of solr. How shall I hack the
> code to do so?
> also, is there any way to stop solr to do its default scoring and sorting?
>
> Thanks,
> Gaurav
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Change-default-scoring-formula-tp3012196p3012196.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>