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 Jonathan Rochkind <ro...@jhu.edu> on 2010/06/16 21:27:42 UTC

LocalParams, quotes, bug?

So using LocalParams with dollar-sign references to other parameters.

In LocalParams in general, you can use single-quotes for values that 
have spaces in them:

{!dismax qf='field^5 field2^10'}    =>   no problem

And even if the value does not have spaces, you can use single quotes 
too, why not:

{!dismax qf='field'}   => no problem

But when it comes to dollar sign variable dereferences, this does not 
seem to be true.

{!dismax qf=$some_qf}   => no problem, and debugQuery reveals it is 
indeed using the qf I desire.

{!dismax qf='$some_qf'}  => Solr throws "undefined field $some_qf".  


Is this a bug in Solr?

Re: LocalParams, quotes, bug?

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Wed, Jun 16, 2010 at 3:27 PM, Jonathan Rochkind <ro...@jhu.edu> wrote:
> {!dismax qf=$some_qf}   => no problem, and debugQuery reveals it is indeed
> using the qf I desire.
>
> {!dismax qf='$some_qf'}  => Solr throws "undefined field $some_qf".
>
> Is this a bug in Solr?

Nope, it's by design.
Parameter referencing is pretty simple... the only thing that works is
a bare foo=$bar

-Yonik
http://www.lucidimagination.com