Add condition to specific content type in apache solr I've installed apachesolr,search api solr and views. I have only indexed article and basic page content type.

Then i've added new field "internal use only" as checkbox for article content type. I want to add filter "internal use only" only in article content type. I want to show except those articles.

How to alter apache query?
Check apachesolr.api >> hook_apachesolr_query_alter

function hook_apachesolr_query_alter(DrupalSolrQueryInterface $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');
}


More details about solr query DrupalSolrQueryInterface