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