function apachesolr_nodeapi in Apache Solr Search 5.2
Same name and namespace in other branches
- 5 apachesolr.module \apachesolr_nodeapi()
- 6.3 apachesolr.module \apachesolr_nodeapi()
- 6 apachesolr.module \apachesolr_nodeapi()
- 6.2 apachesolr.module \apachesolr_nodeapi()
Implementation of hook_nodeapi().
File
- ./
apachesolr.module, line 530 - Integration with the Apache Solr search application.
Code
function apachesolr_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'delete':
_apachesolr_nodeapi_delete($node);
break;
case 'insert':
// Make sure no node ends up with a timestamp that's in the future
// by using time() rather than the node's changed or created timestamp.
db_query("INSERT INTO {apachesolr_search_node} (nid, status, changed) VALUES (%d, %d, %d)", $node->nid, $node->status, time());
break;
case 'update':
_apachesolr_nodeapi_update($node);
break;
}
}