Implement boolean search in apache solr search I am working on Apache solr search. I want to implement boolean search in apache solr search.

On  google i found following article and many more articles. 

I have also seen the hook_apachesolr_query_alter but i have no idea how to implement the apache solr alter function.

If any one have prior information how to implement it, please guide me to achieve it
Here is a basic example of adding an extra parameter to the search query using the hook_apachesolr_query_alter()

/**
 * Implements hook_altersolr_apachesolr_query_alter().
 */
function mymodule_altersolr_apachesolr_query_alter($query) {
  $query-&gt;addParam('fq', 'my_field:(value)');
}


Check this page for more possibilities on altering the search query: http://drupalcontrib.org/api/drupal/contributions%21apachesolr%21apachesolr.interface.inc/interface/DrupalSolrQueryInterface/7