I'm trying to use the Dismax request handler, and thanks to the list, I
fixed one problem, which was the existing configs in solrconfig.xml.
I'm now just not getting any result from the query though. I changed
the dismax section in solrconfig.xml to this:
<requestHandler name="dismax" class="solr.SearchHandler" >
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<int name="ps">100</int>
<str name="q.alt">*:*</str>
<str name="hl.fl">artist title</str>
<str name="f.name.hl.fragsize">0</str>
<str name="f.name.hl.alternateField">title</str>
<str name="f.text.hl.fragmenter">regex</str>
</lst>
</requestHandler>
I'm using solr-php-client for my query, and the code looks like this:
$params['qt'] = 'dismax';
$params['qf'] = 'title^100 artist^150 description^5 tags^'.$tagboost.'
artist_title^500 featuring_artist^20 collaborators^50';
$params['pf'] = 'artist_title';
$query = "title:$search artist:$search description:$search
tags:$search +type:$type artist_title:$search featuring_artist:$search
collaborators:$search";
$response = $solr->search( $query, 0, 30 ,$params);
The raw query ends up as this:
/solr/select?qt=dismax&qf=title%5E100+artist%5E150+description%5E5+tags%5E10+artist_title%5E500+featuring_artist%5E20+collaborators%5E50&pf=artist_title&q=title%3Aakon+artist%3Aakon+description%3Aakon+tags%3Aakon+%2Btype%3Avideo+artist_title%3Aakon+featuring_artist%3Aakon+collaborators%3Aakon&version=1.2&wt=json&json.nl=map&start=0&rows=30
Responseheader is this:
{"responseHeader":{"status":0,"QTime":9,"params":{"pf":"artist_title","start":"0","q":"title:akon artist:akon description:akon tags:akon +type:video artist_title:akon featuring_artist:akon
collaborators:akon","qf":"title^100 artist^150 description^5 tags^10 artist_title^500 featuring_artist^20
collaborators^50","json.nl":"map","qt":"dismax","wt":"json","version":"1.2","rows":"30"}},"response":{"numFound":0,"start":0,"docs":[]}}
If I remove the qt=dismax, I get results like I should. Can anyone shed
some light?
Thanks,
Alex