function apachesolr_index_status in Apache Solr Search 6
Same name and namespace in other branches
- 8 apachesolr.index.inc \apachesolr_index_status()
- 5.2 apachesolr.module \apachesolr_index_status()
- 6.3 apachesolr.index.inc \apachesolr_index_status()
- 6.2 apachesolr.module \apachesolr_index_status()
- 7 apachesolr.index.inc \apachesolr_index_status()
Helper function for modules implmenting hook_search's 'status' op.
2 calls to apachesolr_index_status()
- apachesolr_search_help in ./
apachesolr_search.module - Implementation of hook_help().
- apachesolr_search_search in ./
apachesolr_search.module - Implementation of hook_search().
File
- ./
apachesolr.module, line 290 - Integration with the Apache Solr search application.
Code
function apachesolr_index_status($namespace) {
list($excluded_types, $args, $join_sql, $exclude_sql) = _apachesolr_exclude_types($namespace);
$total = db_result(db_query("SELECT COUNT(asn.nid) FROM {apachesolr_search_node} asn " . $join_sql . "WHERE asn.status = 1 " . $exclude_sql, $excluded_types));
$remaining = db_result(db_query("SELECT COUNT(asn.nid) FROM {apachesolr_search_node} asn " . $join_sql . "WHERE (asn.changed > %d OR (asn.changed = %d AND asn.nid > %d)) AND asn.status = 1 " . $exclude_sql, $args));
return array(
'remaining' => $remaining,
'total' => $total,
);
}