| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2014-04-21 10:44 UTC] aliuz1 at gmail dot com
 Description: ------------ Hello, I'm not sure if it's already available but after looking at the documentation extensively I am at a loss on how to add parameters for implementing dismax/edismax for my queries. I would like to construct a query similar to the following: q=partydress&defType=edismax&mm=2 But I don't think there is a way with the current release. Please correct me/lead me in the right path if I am wrong. Otherwise, I would think this to be a useful change request. Thank you, Ali. Test script: --------------- No test scripts because the operation requested is not supported at the moment PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 12:00:01 2025 UTC | 
Hello Ali, Thanks for pointing that out, DisMax/eDisMax query parsers are not currently supported natively, but their support will be implemented very soon. For the time being you can use dismax/edismax by utilizing SolrQuery::setParam() method (inherited from SolrModifiableParams) as the following example: $options = array ( 'hostname' => SOLR_SERVER_HOSTNAME, 'login' => SOLR_SERVER_USERNAME, 'password' => SOLR_SERVER_PASSWORD, 'port' => SOLR_SERVER_PORT, ); $client = new SolrClient($options); $query = new SolrQuery(); $query->setQuery('partydress'); $query->setParam('defType', 'dismax'); // any additional fields $query->setParam('q.alt','*:*'); $query->setParam('mm', 2); $query->setParam('qf', 'features^20.0 text^0.3'); ....etc refs: http://www.php.net/manual/en/class.solrquery.php http://www.php.net/manual/en/class.solrmodifiableparams.php