Re: DisMaxRequestHandler bf configuration
On Jan 7, 2010, at 10:18 PM, Andy wrote: Oh I see. Is popularityboost the name of the parameter? requestHandler name=standard class=solr.StandardRequestHandler lst name=defaults str name=q{!boost b=$popularityboost v=$qq}/str str name=popularityboostlog(popularity)/str /lst /requestHandler popularityboost is entirely arbitrary here. Use whatever name you like, it's a simple substitution in the q part for $popularityboost And yes, what you've done above is correct. Erik
Re: DisMaxRequestHandler bf configuration
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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 8:42 PM On Wed, Jan 6, 2010 at 8:24 PM, Andy angelf...@yahoo.com 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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 7:48 PM On Wed, Jan 6, 2010 at 7:43 PM, Andy angelf...@yahoo.com 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
Re: DisMaxRequestHandler bf configuration
Thanks. Can I use the standard request handler for this purpose? So something like: requestHandler name=standard class=solr.StandardRequestHandler lst name=defaults str name=q{!boost b=$popularityboost v=$qq}popularityboost=log(popularity)/str /lst /requestHandlerOr do I still need the dismax handler? --- On Thu, 1/7/10, Erik Hatcher erik.hatc...@gmail.com wrote: From: Erik Hatcher erik.hatc...@gmail.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Thursday, January 7, 2010, 4:56 AM 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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 8:42 PM On Wed, Jan 6, 2010 at 8:24 PM, Andy angelf...@yahoo.com 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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 7:48 PM On Wed, Jan 6, 2010 at 7:43 PM, Andy angelf...@yahoo.com 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
Re: DisMaxRequestHandler bf configuration
On Jan 7, 2010, at 9:51 PM, Andy wrote: Thanks. Can I use the standard request handler for this purpose? So something like: Yes, but... requestHandler name=standard class=solr.StandardRequestHandler lst name=defaults str name=q{!boost b=$popularityboost v= $qq}popularityboost=log(popularity)/str /lst /requestHandlerOr do I still need the dismax handler? popularityboost needs to be a separate str parameter. Erik
Re: DisMaxRequestHandler bf configuration
Oh I see. Is popularityboost the name of the parameter? requestHandler name=standard class=solr.StandardRequestHandler lst name=defaults str name=q{!boost b=$popularityboost v=$qq}/str str name=popularityboostlog(popularity)/str /lst /requestHandler --- On Thu, 1/7/10, Erik Hatcher erik.hatc...@gmail.com wrote: From: Erik Hatcher erik.hatc...@gmail.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Thursday, January 7, 2010, 9:57 PM On Jan 7, 2010, at 9:51 PM, Andy wrote: Thanks. Can I use the standard request handler for this purpose? So something like: Yes, but... requestHandler name=standard class=solr.StandardRequestHandler lst name=defaults str name=q{!boost b=$popularityboost v=$qq}popularityboost=log(popularity)/str /lst /requestHandlerOr do I still need the dismax handler? popularityboost needs to be a separate str parameter. Erik
Re: DisMaxRequestHandler bf configuration
On Wed, Jan 6, 2010 at 2:43 AM, Andy angelf...@yahoo.com wrote: I'd like to boost every query using {!boost b=log(popularity)}. But I'd rather not have to prepend that to every query. It'd be much cleaner for me to configure Solr to use that as default. My plan is to make DisMaxRequestHandler the default handler and add the following to solrconfig.xml: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str str name=echoParamsexplicit/str float name=tie0.01/float str name=bf log(popularity) /str /lst /requestHandler Is this the correct way to do it? bf adds in the function query {!boost} multiples the function query In the new edismax (which may replace dismax soon) you can specify the multiplicative boost via boost=log(popularity) -Yonik http://www.lucidimagination.com
Re: DisMaxRequestHandler bf configuration
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? If that's the case, can you tell me how to set up/use edismax? I can't find much documentation on it. Is it recommended for production use? --- On Wed, 1/6/10, Yonik Seeley yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 7:09 PM On Wed, Jan 6, 2010 at 2:43 AM, Andy angelf...@yahoo.com wrote: I'd like to boost every query using {!boost b=log(popularity)}. But I'd rather not have to prepend that to every query. It'd be much cleaner for me to configure Solr to use that as default. My plan is to make DisMaxRequestHandler the default handler and add the following to solrconfig.xml: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str str name=echoParamsexplicit/str float name=tie0.01/float str name=bf log(popularity) /str /lst /requestHandler Is this the correct way to do it? bf adds in the function query {!boost} multiples the function query In the new edismax (which may replace dismax soon) you can specify the multiplicative boost via boost=log(popularity) -Yonik http://www.lucidimagination.com
Re: DisMaxRequestHandler bf configuration
On Wed, Jan 6, 2010 at 7:43 PM, Andy angelf...@yahoo.com 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 If that's the case, can you tell me how to set up/use edismax? I can't find much documentation on it. Is it recommended for production use? It's in trunk (not 1.4). -Yonik http://www.lucidimagination.com
Re: DisMaxRequestHandler bf configuration
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. --- On Wed, 1/6/10, Yonik Seeley yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 7:48 PM On Wed, Jan 6, 2010 at 7:43 PM, Andy angelf...@yahoo.com 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
Re: DisMaxRequestHandler bf configuration
On Wed, Jan 6, 2010 at 8:24 PM, Andy angelf...@yahoo.com 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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 7:48 PM On Wed, Jan 6, 2010 at 7:43 PM, Andy angelf...@yahoo.com 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
Re: DisMaxRequestHandler bf configuration
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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 8:42 PM On Wed, Jan 6, 2010 at 8:24 PM, Andy angelf...@yahoo.com 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 yo...@lucidimagination.com wrote: From: Yonik Seeley yo...@lucidimagination.com Subject: Re: DisMaxRequestHandler bf configuration To: solr-user@lucene.apache.org Date: Wednesday, January 6, 2010, 7:48 PM On Wed, Jan 6, 2010 at 7:43 PM, Andy angelf...@yahoo.com 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
DisMaxRequestHandler bf configuration
I'd like to boost every query using {!boost b=log(popularity)}. But I'd rather not have to prepend that to every query. It'd be much cleaner for me to configure Solr to use that as default. My plan is to make DisMaxRequestHandler the default handler and add the following to solrconfig.xml: requestHandler name=dismax class=solr.SearchHandler default=true lst name=defaults str name=defTypedismax/str str name=echoParamsexplicit/str float name=tie0.01/float str name=bf log(popularity) /str /lst /requestHandler Is this the correct way to do it?