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 Benson Margulies <bi...@gmail.com> on 2012/04/15 14:43:15 UTC

Questions about the query function

I've been pestering you all with a series of questions about
disassembling and partially rescoring queries. Every helpful response
(thanks) has led me to further reading, and this leads to more
questions. If I haven't before, I'll apologize now for the high level
of ignorance at which I'm starting. This morning I'm wading in the
pool of subqueries.

An example from the wiki:

q=product(popularity, query({!dismax qf=text v='solr rocks'}))

What's the use/net effect of having a Q that amounts to a number? The
final number becomes the score, yes? Why doesn't this example have to
use _val_? Is there an assumed defType of func?

Reading QueryValueSource.java, I'm wondering about the speed of
something like this, or, more to the point, something like a
calculation on two queries. Does this iteratively run the subquery for
each document otherwise under consideration? I see some code that
might be an optimization here.

I'm also wondering, is there a way to express that I only want to see
results that meet some threshold value for a subquery?

Does _val_ (or the local param syntax) manufacture a field that
appears in returned documents? If so, is its name _val_? In which
case, can there be more than one?

Re: Questions about the query function

Posted by Benson Margulies <bi...@gmail.com>.
Since I ended up with 'fund' instead of 'func' we're even. I made the
edit. I'd make some more if you answered more of my questions :-)

On Sun, Apr 15, 2012 at 9:42 AM, Erik Hatcher <er...@gmail.com> wrote:
>
>>> _val_ would work too, or of course using that function as a parameter to (e)dismay's bf, or dismay's boost params.
>
> oops.... damn you autocorrect.  I've been fighting this one since upgrading to Lion and will turn it off.  s/dismay/dismax/!  :)
>
>        Erik
>

Re: Questions about the query function

Posted by Erik Hatcher <er...@gmail.com>.
>> _val_ would work too, or of course using that function as a parameter to (e)dismay's bf, or dismay's boost params.

oops.... damn you autocorrect.  I've been fighting this one since upgrading to Lion and will turn it off.  s/dismay/dismax/!  :)

	Erik


Re: Questions about the query function

Posted by Benson Margulies <bi...@gmail.com>.
On Sun, Apr 15, 2012 at 9:03 AM, Erik Hatcher <er...@gmail.com> wrote:
>> Why doesn't this example have to
>> use _val_? Is there an assumed defType of fund?
>
> Yeah, that wiki page is misleading there, as it is implying a non-specified defType=func.  Wanna fix up the wiki to make this clear?

Yup.

>
> _val_ would work too, or of course using that function as a parameter to (e)dismay's bf, or dismay's boost params.
>
>        Erik
>
>
>
> On Apr 15, 2012, at 08:43 , Benson Margulies wrote:
>
>> I've been pestering you all with a series of questions about
>> disassembling and partially rescoring queries. Every helpful response
>> (thanks) has led me to further reading, and this leads to more
>> questions. If I haven't before, I'll apologize now for the high level
>> of ignorance at which I'm starting. This morning I'm wading in the
>> pool of subqueries.
>>
>> An example from the wiki:
>>
>> q=product(popularity, query({!dismax qf=text v='solr rocks'}))
>>
>> What's the use/net effect of having a Q that amounts to a number? The
>> final number becomes the score, yes? Why doesn't this example have to
>> use _val_? Is there an assumed defType of func?
>>
>> Reading QueryValueSource.java, I'm wondering about the speed of
>> something like this, or, more to the point, something like a
>> calculation on two queries. Does this iteratively run the subquery for
>> each document otherwise under consideration? I see some code that
>> might be an optimization here.
>>
>> I'm also wondering, is there a way to express that I only want to see
>> results that meet some threshold value for a subquery?
>>
>> Does _val_ (or the local param syntax) manufacture a field that
>> appears in returned documents? If so, is its name _val_? In which
>> case, can there be more than one?
>

Re: Questions about the query function

Posted by Erik Hatcher <er...@gmail.com>.
> Why doesn't this example have to
> use _val_? Is there an assumed defType of fund?

Yeah, that wiki page is misleading there, as it is implying a non-specified defType=func.  Wanna fix up the wiki to make this clear?

_val_ would work too, or of course using that function as a parameter to (e)dismay's bf, or dismay's boost params.

	Erik



On Apr 15, 2012, at 08:43 , Benson Margulies wrote:

> I've been pestering you all with a series of questions about
> disassembling and partially rescoring queries. Every helpful response
> (thanks) has led me to further reading, and this leads to more
> questions. If I haven't before, I'll apologize now for the high level
> of ignorance at which I'm starting. This morning I'm wading in the
> pool of subqueries.
> 
> An example from the wiki:
> 
> q=product(popularity, query({!dismax qf=text v='solr rocks'}))
> 
> What's the use/net effect of having a Q that amounts to a number? The
> final number becomes the score, yes? Why doesn't this example have to
> use _val_? Is there an assumed defType of func?
> 
> Reading QueryValueSource.java, I'm wondering about the speed of
> something like this, or, more to the point, something like a
> calculation on two queries. Does this iteratively run the subquery for
> each document otherwise under consideration? I see some code that
> might be an optimization here.
> 
> I'm also wondering, is there a way to express that I only want to see
> results that meet some threshold value for a subquery?
> 
> Does _val_ (or the local param syntax) manufacture a field that
> appears in returned documents? If so, is its name _val_? In which
> case, can there be more than one?