add condition in apache solr serch query I want to alter apache solr search query with my custom filed.

I have custom content type called "Restaurant" and in this content type i have 1 field called "country". Now I want to add condition that display search result only those restaurant which is belong to "Jamaica" and display facet as per this condition.

So,how can I alter query with apache solr serach?
You can use hook_apachesolr_query_alter()


  Alter the query after it's prepared and cached.


Example from the docs page

function hook_apachesolr_query_alter($query) {
  // I only want to see articles by the admin.
  //
  // NOTE: this "is_uid" filter does NOT refer to the English word "is"
  // It is a combination of flags representing Integer-Single, which is
  // abbreviated with the letters i and s.
  //
  // @see the &lt;dynamicField&gt; definitions in schema.xml or schema-solr3.xml
  $query-&gt;addFilter("is_uid", 1);

  // Only search titles.
  $query-&gt;replaceParam('qf', 'label');
}