You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bill Bell <bi...@gmail.com> on 2011/04/20 05:41:52 UTC

How to return score without using _val_

I would like to influence the score but I would rather not mess with the q=
field since I want the query to dismax for Q.

Something like:

fq={!type=dismax qf=$qqf v=$qspec}&
fq={!type=dismax qt=dismaxname v=$qname}&
q=_val_:"{!type=dismax qf=$qqf  v=$qspec}" _val_:"{!type=dismax
qt=dismaxname v=$qname}"

Is there a way to do a filter and add the FQ to the score by doing it
another way? 

Also does this do multiple queries? Is this the right way to do it?





Re: How to return score without using _val_

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Tue, Apr 19, 2011 at 11:41 PM, Bill Bell <bi...@gmail.com> wrote:
> I would like to influence the score but I would rather not mess with the q=
> field since I want the query to dismax for Q.
>
> Something like:
>
> fq={!type=dismax qf=$qqf v=$qspec}&
> fq={!type=dismax qt=dismaxname v=$qname}&
> q=_val_:"{!type=dismax qf=$qqf  v=$qspec}" _val_:"{!type=dismax
> qt=dismaxname v=$qname}"
>
> Is there a way to do a filter and add the FQ to the score by doing it
> another way?
>
> Also does this do multiple queries? Is this the right way to do it?

I really don't understand what you're trying to do...
Backing up, you say you want to influence the score,  but I can't
figure out how you would like to influence the score.

Do you want to:
 - add the score of another query to the main dismax query (use "bq")
 - multiply the main dismax score by another query (use edismax along
with boost, or the boost query type)
 - something else?

-Yonik
http://www.lucenerevolution.org -- Lucene/Solr User Conference, May
25-26, San Francisco

Re: How to return score without using _val_

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Fri, Apr 22, 2011 at 12:26 AM, Bill Bell <bi...@gmail.com> wrote:
> I know that the _val_ is the only thing influencing the score.

What creates the score is the main query.
There are tons of ways to build up that main query in different ways.
So the answer to your question is "yes", you can influence the score
without messing with the "q" param.
To get more help, you need to get more specific about what you are
trying to do though (or come up with a concrete example using the
example docs, etc).

> The fq is just to limit also by those queries.
>
> What I am asking is if it is possible to just influence the score using
> _val_ but not in the Q parameter?
>
> Something like bq=val_:"{!type=dismax qf=$qqf  v=$qspec}"
> _val_:"{!type=dismax
> qt=dismaxname v=$qname}"
>
>
> Is there something like that?

Sure.  Doesn't what you tried above work?


-Yonik
http://www.lucenerevolution.org -- Lucene/Solr User Conference, May
25-26, San Francisco

Re: How to return score without using _val_

Posted by Em <ma...@yahoo.de>.
Hi,

did you have a look at the query()-function mentioned in the Wiki?
It sounds like something you should give a try!

Regards,
Em


Bill Bell wrote:
> 
> I know that the _val_ is the only thing influencing the score.
> 
> The fq is just to limit also by those queries.
> 
> What I am asking is if it is possible to just influence the score using
> _val_ but not in the Q parameter?
> 
> Something like bq=val_:"{!type=dismax qf=$qqf  v=$qspec}"
> _val_:"{!type=dismax
> qt=dismaxname v=$qname}"
> 
> 
> Is there something like that?
> 
> On 4/21/11 2:45 AM, "Em" &lt;mailformailinglists@yahoo.de&gt; wrote:
> 
>>Hi,
>>
>>I agree with Yonik here - I do not understand what you would like to do as
>>well.
>>But some additional note from my side:
>>Your FQs never influences the score! Of course you can specify the same
>>query twice, once as a filter - query and once as a regular query but I do
>>not see the reason to do so. It sounds like unnecessary effort without a
>>win. 
>>
>>Regards,
>>Em 
>>
>>
>>Bill Bell wrote:
>>> 
>>> I would like to influence the score but I would rather not mess with the
>>> q=
>>> field since I want the query to dismax for Q.
>>> 
>>> Something like:
>>> 
>>> fq={!type=dismax qf=$qqf v=$qspec}&
>>> fq={!type=dismax qt=dismaxname v=$qname}&
>>> q=_val_:"{!type=dismax qf=$qqf  v=$qspec}" _val_:"{!type=dismax
>>> qt=dismaxname v=$qname}"
>>> 
>>> Is there a way to do a filter and add the FQ to the score by doing it
>>> another way? 
>>> 
>>> Also does this do multiple queries? Is this the right way to do it?
>>> 
>>
>>
>>--
>>View this message in context:
>>http://lucene.472066.n3.nabble.com/How-to-return-score-without-using-val-t
>>p2841443p2846317.html
>>Sent from the Solr - User mailing list archive at Nabble.com.
> 


--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-return-score-without-using-val-tp2841443p2850979.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to return score without using _val_

Posted by Bill Bell <bi...@gmail.com>.
I know that the _val_ is the only thing influencing the score.

The fq is just to limit also by those queries.

What I am asking is if it is possible to just influence the score using
_val_ but not in the Q parameter?

Something like bq=val_:"{!type=dismax qf=$qqf  v=$qspec}"
_val_:"{!type=dismax
qt=dismaxname v=$qname}"


Is there something like that?

On 4/21/11 2:45 AM, "Em" <ma...@yahoo.de> wrote:

>Hi,
>
>I agree with Yonik here - I do not understand what you would like to do as
>well.
>But some additional note from my side:
>Your FQs never influences the score! Of course you can specify the same
>query twice, once as a filter - query and once as a regular query but I do
>not see the reason to do so. It sounds like unnecessary effort without a
>win. 
>
>Regards,
>Em 
>
>
>Bill Bell wrote:
>> 
>> I would like to influence the score but I would rather not mess with the
>> q=
>> field since I want the query to dismax for Q.
>> 
>> Something like:
>> 
>> fq={!type=dismax qf=$qqf v=$qspec}&
>> fq={!type=dismax qt=dismaxname v=$qname}&
>> q=_val_:"{!type=dismax qf=$qqf  v=$qspec}" _val_:"{!type=dismax
>> qt=dismaxname v=$qname}"
>> 
>> Is there a way to do a filter and add the FQ to the score by doing it
>> another way? 
>> 
>> Also does this do multiple queries? Is this the right way to do it?
>> 
>
>
>--
>View this message in context:
>http://lucene.472066.n3.nabble.com/How-to-return-score-without-using-val-t
>p2841443p2846317.html
>Sent from the Solr - User mailing list archive at Nabble.com.



Re: How to return score without using _val_

Posted by Em <ma...@yahoo.de>.
Hi,

I agree with Yonik here - I do not understand what you would like to do as
well.
But some additional note from my side:
Your FQs never influences the score! Of course you can specify the same
query twice, once as a filter - query and once as a regular query but I do
not see the reason to do so. It sounds like unnecessary effort without a
win. 

Regards,
Em 


Bill Bell wrote:
> 
> I would like to influence the score but I would rather not mess with the
> q=
> field since I want the query to dismax for Q.
> 
> Something like:
> 
> fq={!type=dismax qf=$qqf v=$qspec}&
> fq={!type=dismax qt=dismaxname v=$qname}&
> q=_val_:"{!type=dismax qf=$qqf  v=$qspec}" _val_:"{!type=dismax
> qt=dismaxname v=$qname}"
> 
> Is there a way to do a filter and add the FQ to the score by doing it
> another way? 
> 
> Also does this do multiple queries? Is this the right way to do it?
> 


--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-return-score-without-using-val-tp2841443p2846317.html
Sent from the Solr - User mailing list archive at Nabble.com.