function apachesolr_get_nodes_to_index in Apache Solr Search 6
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_get_nodes_to_index()
- 5.2 apachesolr.module \apachesolr_get_nodes_to_index()
- 6.3 apachesolr.module \apachesolr_get_nodes_to_index()
- 6.2 apachesolr.module \apachesolr_get_nodes_to_index()
- 7 apachesolr.module \apachesolr_get_nodes_to_index()
Returns an array of rows from a query based on an indexing namespace.
2 calls to apachesolr_get_nodes_to_index()
- apachesolr_drush_solr_index in drush/
apachesolr.drush.inc - apachesolr_search_update_index in ./
apachesolr_search.module - Implementation of hook_update_index().
File
- ./
apachesolr.module, line 385 - Integration with the Apache Solr search application.
Code
function apachesolr_get_nodes_to_index($namespace, $limit) {
$rows = array();
if (variable_get('apachesolr_read_only', APACHESOLR_READ_WRITE) == APACHESOLR_READ_ONLY) {
return $rows;
}
list($excluded_types, $args, $join_sql, $exclude_sql) = _apachesolr_exclude_types($namespace);
$result = db_query_range("SELECT asn.nid, asn.changed 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 . "ORDER BY asn.changed ASC, asn.nid ASC", $args, 0, $limit);
while ($row = db_fetch_object($result)) {
$rows[] = $row;
}
return $rows;
}