function apachesolr_multisitesearch_apachesolr_delete_by_query_alter in Apache Solr Multisite Search 7
Same name and namespace in other branches
- 6.3 apachesolr_multisitesearch.module \apachesolr_multisitesearch_apachesolr_delete_by_query_alter()
Implements hook_apachesolr_delete_by_query_alter().
Allows a module to modify the delete query.
Parameters
string $query: Defaults to *:*
File
- ./
apachesolr_multisitesearch.module, line 288 - Provides a multi-site search implementation for use with the Apache Solr module
Code
function apachesolr_multisitesearch_apachesolr_delete_by_query_alter(&$query) {
// use the site hash so that you only delete this site's content
if ($query == '*:*') {
$query = 'hash:' . apachesolr_site_hash();
}
else {
$query = "({$query}) AND hash:" . apachesolr_site_hash();
}
}