On Mar 17, 2010, at 3:38 PM, Alex Thurlow wrote:
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:
$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
The dismax parser does not support fielded queries, so title$search...
etc is not parsing as you expect. qf/pf control the fields searched.
If you need fielded searches like you're attempting, you'll need to
overhaul how you're doing the parsing.
You'll likely also want to tune the mm parameter.
If I remove the qt=dismax, I get results like I should. Can anyone
shed some light?
Right, because the default is to use the SolrQueryParser, which
supports fielded syntax.
Erik