function apachesolr_exclude_types in Apache Solr Search 6.2
2 calls to apachesolr_exclude_types()
- apachesolr_get_nodes_to_index in ./
apachesolr.module - Returns an array of rows from a query based on an indexing namespace.
- apachesolr_index_status in ./
apachesolr.module - Helper function for modules implmenting hook_search's 'status' op.
File
- ./
apachesolr.module, line 361 - Integration with the Apache Solr search application.
Code
function apachesolr_exclude_types($namespace) {
extract(apachesolr_get_last_index($namespace));
$excluded_types = module_invoke_all('apachesolr_types_exclude', $namespace);
$args = array(
$last_change,
$last_change,
$last_nid,
);
$join_sql = '';
$exclude_sql = '';
if ($excluded_types) {
$excluded_types = array_unique($excluded_types);
$join_sql = "INNER JOIN {node} n ON n.nid = asn.nid ";
$exclude_sql = "AND n.type NOT IN(" . db_placeholders($excluded_types, 'varchar') . ") ";
$args = array_merge($args, $excluded_types);
}
return array(
$excluded_types,
$args,
$join_sql,
$exclude_sql,
);
}