Alter keywords searched in solr
In solrconfig.xml 

&lt;requestHandler name="drupal" class="solr.SearchHandler" default="true"&gt;
&lt;str name="defType"&gt;dismax&lt;/str&gt;


so the request handler was "default" hence query was parsed with deftype:dismax and dismax does not parse BOOLEAN operators in the query string.

I created a new HANDLER in solrconfig.xml

&lt;requestHandler name="sohail" class="solr.SearchHandler" &gt;
    &lt;lst name="defaults"&gt;
     &lt;str name="echoParams"&gt;explicit&lt;/str&gt;
     &lt;bool name="omitHeader"&gt;true&lt;/bool&gt;


Set $params[qt] = "sohail"; in the MYMODULE_apachesolr_modify_query()

Now it works perfectly!