RE: FW: Score customization

2008-11-12 Thread lajkonik86


I effectively need to use a multiplication in the sorting of the items.
Something like score*popularity.
It seems the only way to do this is to use a bf parameter.
However how do you use bf in combination with the standard requestHandler?


hossman wrote:
 
 
 : Now I need to know whether the FunctionQuery result is considered during 
 : the results sorting. That is, are search results sorted according to the 
 : sum of the similarity and the FunctionQuery value or according to 
 : similarity only?
 
 a function query in a larger query contributes to the score just like any 
 other clause ... if you sort by score, you are sorting by the *whole* 
 score ... if you sort by some other field then the *whole* score is 
 irrelevant.
 
 
 
 -Hoss
 
 
 


-- 
View this message in context: 
http://www.nabble.com/Score-customization-tp13404845p20458084.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: FW: Score customization

2008-11-12 Thread Nguyen, Joe
You could use function query with standardRequestHandler to influence
the final score and sort result by score.  If you want to control how
much the function query would affect the original score, you could use
the linear function.

-Original Message-
From: lajkonik86 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2008 2:55 Joe
To: solr-user@lucene.apache.org
Subject: RE: FW: Score customization



I effectively need to use a multiplication in the sorting of the items.
Something like score*popularity.
It seems the only way to do this is to use a bf parameter.
However how do you use bf in combination with the standard
requestHandler?


hossman wrote:
 
 
 : Now I need to know whether the FunctionQuery result is considered 
 during
 : the results sorting. That is, are search results sorted according to

 the
 : sum of the similarity and the FunctionQuery value or according to
 : similarity only?
 
 a function query in a larger query contributes to the score just like 
 any other clause ... if you sort by score, you are sorting by the 
 *whole* score ... if you sort by some other field then the *whole* 
 score is irrelevant.
 
 
 
 -Hoss
 
 
 


--
View this message in context:
http://www.nabble.com/Score-customization-tp13404845p20458084.html
Sent from the Solr - User mailing list archive at Nabble.com.



RE: FW: Score customization

2008-11-12 Thread Chris Hostetter

: I effectively need to use a multiplication in the sorting of the items.
: Something like score*popularity.
: It seems the only way to do this is to use a bf parameter.
: However how do you use bf in combination with the standard requestHandler?

functions are understood by the standard query parser using the 
_val_:func(...) hack...

http://wiki.apache.org/solr/SolrQuerySyntax


-Hoss



RE: FW: Score customization

2007-11-03 Thread Victoria Kaganski
I guess I was not clear... I understand that if I use FunctionQuery, it's 
result value will return as the score, instead of the similarity. Am I right? 



From: [EMAIL PROTECTED] on behalf of Yonik Seeley
Sent: Wed 10/31/2007 7:21 PM
To: solr-user@lucene.apache.org
Subject: Re: FW: Score customization



On 10/31/07, Victoria Kaganski [EMAIL PROTECTED] wrote:
 Does FunctionQuery actually override the default similarity function? If
 it does, how can I still access the similarity value?

FunctionQuery returns the *value* of a field (or a function of it) as
the value for a query - it does not use Similarity at all.

If you put a FunctionQuery in a BooleanQuery with other queries (like
normal relevance queries), the scores will be added together.

If you use a BoostedQuery, the FunctionQuery score will be multiplied
by the normal relevance score.

-Yonik





Re: FW: Score customization

2007-11-03 Thread Yonik Seeley
On 11/3/07, Victoria Kaganski [EMAIL PROTECTED] wrote:
 I guess I was not clear... I understand that if I use FunctionQuery, it's 
 result value will return as the score, instead of the similarity. Am I right?

Only for the FunctionQuery part... it's not an all or nothing thing.

Let me give you a specific example in Solr Query syntax:

+text:spider man~100 _val_:popularity

This query will result in the full-text relevance score (yes, using
similarity) of the first part added to the value of the popularity
field.  Try some examples out and let us know if you don't get what
you expect.

-Yonik




 

 From: [EMAIL PROTECTED] on behalf of Yonik Seeley
 Sent: Wed 10/31/2007 7:21 PM
 To: solr-user@lucene.apache.org
 Subject: Re: FW: Score customization



 On 10/31/07, Victoria Kaganski [EMAIL PROTECTED] wrote:
  Does FunctionQuery actually override the default similarity function? If
  it does, how can I still access the similarity value?

 FunctionQuery returns the *value* of a field (or a function of it) as
 the value for a query - it does not use Similarity at all.

 If you put a FunctionQuery in a BooleanQuery with other queries (like
 normal relevance queries), the scores will be added together.

 If you use a BoostedQuery, the FunctionQuery score will be multiplied
 by the normal relevance score.

 -Yonik






RE: FW: Score customization

2007-11-03 Thread Victoria Kaganski
Oh, I finally understand.
Now I need to know whether the FunctionQuery result is considered during the 
results sorting. That is, are search results sorted according to the sum of the 
similarity and the FunctionQuery value or according to similarity only?



From: [EMAIL PROTECTED] on behalf of Yonik Seeley
Sent: Sat 11/3/2007 11:21 PM
To: solr-user@lucene.apache.org
Subject: Re: FW: Score customization



On 11/3/07, Victoria Kaganski [EMAIL PROTECTED] wrote:
 I guess I was not clear... I understand that if I use FunctionQuery, it's 
 result value will return as the score, instead of the similarity. Am I right?

Only for the FunctionQuery part... it's not an all or nothing thing.

Let me give you a specific example in Solr Query syntax:

+text:spider man~100 _val_:popularity

This query will result in the full-text relevance score (yes, using
similarity) of the first part added to the value of the popularity
field.  Try some examples out and let us know if you don't get what
you expect.

-Yonik




 

 From: [EMAIL PROTECTED] on behalf of Yonik Seeley
 Sent: Wed 10/31/2007 7:21 PM
 To: solr-user@lucene.apache.org
 Subject: Re: FW: Score customization



 On 10/31/07, Victoria Kaganski [EMAIL PROTECTED] wrote:
  Does FunctionQuery actually override the default similarity function? If
  it does, how can I still access the similarity value?

 FunctionQuery returns the *value* of a field (or a function of it) as
 the value for a query - it does not use Similarity at all.

 If you put a FunctionQuery in a BooleanQuery with other queries (like
 normal relevance queries), the scores will be added together.

 If you use a BoostedQuery, the FunctionQuery score will be multiplied
 by the normal relevance score.

 -Yonik









RE: FW: Score customization

2007-11-03 Thread Chris Hostetter

: Now I need to know whether the FunctionQuery result is considered during 
: the results sorting. That is, are search results sorted according to the 
: sum of the similarity and the FunctionQuery value or according to 
: similarity only?

a function query in a larger query contributes to the score just like any 
other clause ... if you sort by score, you are sorting by the *whole* 
score ... if you sort by some other field then the *whole* score is 
irrelevant.



-Hoss



Re: FW: Score customization

2007-10-31 Thread Yonik Seeley
On 10/31/07, Victoria Kaganski [EMAIL PROTECTED] wrote:
 Does FunctionQuery actually override the default similarity function? If
 it does, how can I still access the similarity value?

FunctionQuery returns the *value* of a field (or a function of it) as
the value for a query - it does not use Similarity at all.

If you put a FunctionQuery in a BooleanQuery with other queries (like
normal relevance queries), the scores will be added together.

If you use a BoostedQuery, the FunctionQuery score will be multiplied
by the normal relevance score.

-Yonik