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 Peri Stracchino <pe...@york.ac.uk> on 2013/12/06 16:58:15 UTC

alternative to DisMaxRequestHandler needed for upgrade to solr 4.6.0

Hi
I'm trying to upgrade a solr installation from 1.4 (yes, really) to 4.6.0,
and I find our requesthandler was solr.DisMaxRequestHandler, which is now
not only deprecated but deleted from solr-core-4.6.0.jar.  Can anyone
advise on  suitable alternatives, or was there any form of direct
replacement?

Cheers!

Re: alternative to DisMaxRequestHandler needed for upgrade to solr 4.6.0

Posted by Erick Erickson <er...@gmail.com>.
Try edismax it's an improved dismax.  Warning, though, it behaves a bit
differently than dismax so you'll have to look again at the results and
perhaps tweak.

Best,
Erick
On Dec 6, 2013 10:58 AM, "Peri Stracchino" <pe...@york.ac.uk>
wrote:

> Hi
> I'm trying to upgrade a solr installation from 1.4 (yes, really) to 4.6.0,
> and I find our requesthandler was solr.DisMaxRequestHandler, which is now
> not only deprecated but deleted from solr-core-4.6.0.jar.  Can anyone
> advise on  suitable alternatives, or was there any form of direct
> replacement?
>
> Cheers!
>

Re: alternative to DisMaxRequestHandler needed for upgrade to solr 4.6.0

Posted by Peri Stracchino <pe...@york.ac.uk>.
thanks guys, that worked


On 6 December 2013 23:55, Shawn Heisey <so...@elyograg.org> wrote:

> On 12/6/2013 8:58 AM, Peri Stracchino wrote:
>
>> I'm trying to upgrade a solr installation from 1.4 (yes, really) to 4.6.0,
>> and I find our requesthandler was solr.DisMaxRequestHandler, which is now
>> not only deprecated but deleted from solr-core-4.6.0.jar.  Can anyone
>> advise on  suitable alternatives, or was there any form of direct
>> replacement?
>>
>
> Erick is right, you should probably use edismax.
>
> In addition, it's important to note a critical distinction here ... it's
> the *handler* object that's deprecated and removed, not the parser.
>
> The old dismax query parser is still alive and well, alongside the new
> extended dismax query parser.  You need to use a standard search request
> handler and set the defType parameter to dismax or edismax.
>
> http://wiki.apache.org/solr/DisMaxQParserPlugin
> http://wiki.apache.org/solr/ExtendedDisMax
>
> I would recommend that you not use /dismax or /edismax for the handler
> name, just to avoid terminology clashes.  I use /ncdismax for my handler
> name ... the string "nc" has meaning for our web application.  Eventually I
> hope to move all searching to edismax and therefore just use /select or
> /search for the handler name.  Right now we do almost everything with the
> standard query parser, and we are still tuning edismax.
>
> This is my handler definition:
>
> <requestHandler name="/ncdismax" class="solr.SearchHandler">
>   <lst name="defaults">
>     <str name="defType">edismax</str>
>     <str name="echoParams">all</str>
>     <int name="rows">70</int>
>     <str name="df">catchall</str>
>     <xi:include href="shards.xml" xmlns:xi="http://www.w3.org/
> 2001/XInclude"/>
>     <str name="shards.qt">/search</str>
>     <str name="shards.info">true</str>
>     <str name="shards.tolerant">true</str>
>     <float name="tie">0.1</float>
>     <int name="qs">3</int>
>     <int name="ps">3</int>
>     <str name="qf">catchall</str>
>     <str name="pf">catchall^2</str>
>     <str name="boost">min(recip(abs(ms(NOW/HOUR,pd)),1.92901e-10,1.5,
> 1.5),0.85)</str>
>     <str name="mm">100%</str>
>     <str name="q.alt">*:*</str>
>     <bool name="lowercaseOperators">false</bool>
>   </lst>
> </requestHandler>
>
> Thanks,
> Shawn
>
>

Re: alternative to DisMaxRequestHandler needed for upgrade to solr 4.6.0

Posted by Shawn Heisey <so...@elyograg.org>.
On 12/6/2013 8:58 AM, Peri Stracchino wrote:
> I'm trying to upgrade a solr installation from 1.4 (yes, really) to 4.6.0,
> and I find our requesthandler was solr.DisMaxRequestHandler, which is now
> not only deprecated but deleted from solr-core-4.6.0.jar.  Can anyone
> advise on  suitable alternatives, or was there any form of direct
> replacement?

Erick is right, you should probably use edismax.

In addition, it's important to note a critical distinction here ... it's 
the *handler* object that's deprecated and removed, not the parser.

The old dismax query parser is still alive and well, alongside the new 
extended dismax query parser.  You need to use a standard search request 
handler and set the defType parameter to dismax or edismax.

http://wiki.apache.org/solr/DisMaxQParserPlugin
http://wiki.apache.org/solr/ExtendedDisMax

I would recommend that you not use /dismax or /edismax for the handler 
name, just to avoid terminology clashes.  I use /ncdismax for my handler 
name ... the string "nc" has meaning for our web application.  
Eventually I hope to move all searching to edismax and therefore just 
use /select or /search for the handler name.  Right now we do almost 
everything with the standard query parser, and we are still tuning edismax.

This is my handler definition:

<requestHandler name="/ncdismax" class="solr.SearchHandler">
   <lst name="defaults">
     <str name="defType">edismax</str>
     <str name="echoParams">all</str>
     <int name="rows">70</int>
     <str name="df">catchall</str>
     <xi:include href="shards.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude"/>
     <str name="shards.qt">/search</str>
     <str name="shards.info">true</str>
     <str name="shards.tolerant">true</str>
     <float name="tie">0.1</float>
     <int name="qs">3</int>
     <int name="ps">3</int>
     <str name="qf">catchall</str>
     <str name="pf">catchall^2</str>
     <str 
name="boost">min(recip(abs(ms(NOW/HOUR,pd)),1.92901e-10,1.5,1.5),0.85)</str>
     <str name="mm">100%</str>
     <str name="q.alt">*:*</str>
     <bool name="lowercaseOperators">false</bool>
   </lst>
</requestHandler>

Thanks,
Shawn