Alter keywords searched in solr I want to search phrase entered by user as

q="phrase"^21.0 OR phrase


On localhost:8983/solr/admin/form.jsp
it parses "phrase"^21.0 OR phrase perfectly! and return correct results

How can i do it in PHP. I am using Drupal 6.
Please help!!

If more information is required please let me know.
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!