You are here

function apachesolr_mark_entity in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.module \apachesolr_mark_entity()
  2. 7 apachesolr.module \apachesolr_mark_entity()

Mark one entity as needing re-indexing.

7 calls to apachesolr_mark_entity()
apachesolr_access_node_access_records in apachesolr_access/apachesolr_access.module
Implements hook_node_access_records().
apachesolr_comment_delete in ./apachesolr.module
Implements hook_comment_delete().
apachesolr_comment_insert in ./apachesolr.module
Implements hook_comment_insert().
apachesolr_comment_publish in ./apachesolr.module
Implements hook_comment_publish().
apachesolr_comment_unpublish in ./apachesolr.module
Implements hook_comment_unpublish().

... See full list

File

./apachesolr.module, line 605
Integration with the Apache Solr search application.

Code

function apachesolr_mark_entity($entity_type, $entity_id) {
  module_load_include('inc', 'apachesolr', 'apachesolr.index');
  $table = apachesolr_get_indexer_table($entity_type);
  if (!empty($table)) {
    db_update($table)
      ->condition('entity_id', $entity_id)
      ->fields(array(
      'changed' => REQUEST_TIME,
    ))
      ->execute();
  }
}