it wouldn't be q.alt though, just q, in the config file.
q.alt is typically *:*, it's the fall back query when no q is provided.
though, in thinking about it, q.alt would work here, but i'd use q
personally.
On Jan 6, 2010, at 9:45 PM, Andy wrote:
Let me make sure I understand you.
I'd get my regular query from haystack as qq=foo rather than q=foo.
Then I put in solrconfig within the dismax section:
<str name="q.alt">
{!boost b=$popularityboost v=
$qq}&popularityboost=log(popularity)
</str>
Is that what you meant?
--- On Wed, 1/6/10, Yonik Seeley <[email protected]> wrote:
From: Yonik Seeley <[email protected]>
Subject: Re: DisMaxRequestHandler bf configuration
To: [email protected]
Date: Wednesday, January 6, 2010, 8:42 PM
On Wed, Jan 6, 2010 at 8:24 PM, Andy <[email protected]> wrote:
I meant can I do it with dismax without modifying every single
query? I'm accessing Solr through haystack and all queries are
generated by haystack. I'd much rather not have to go under
haystack to modify the generated queries. Hence I'm trying to find
a way to boost every query by default.
If you can get haystack to pass through the user query as something
like qq, then yes - just use something like the last link I showed at
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents
and set defaults for everything except qq.
-Yonik
http://www.lucidimagination.com
--- On Wed, 1/6/10, Yonik Seeley <[email protected]> wrote:
From: Yonik Seeley <[email protected]>
Subject: Re: DisMaxRequestHandler bf configuration
To: [email protected]
Date: Wednesday, January 6, 2010, 7:48 PM
On Wed, Jan 6, 2010 at 7:43 PM, Andy <[email protected]> wrote:
So if I want to configure Solr to turn every query q=foo into q={!
boost b=log(popularity)}foo, dismax wouldn't work but edismax would?
You can do it with dismax.... it's just that the syntax is slightly
more convoluted.
Check out the section on boosting newer documents:
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents