search_wipe

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 search_wipe($sid = NULL, $type = NULL, $reindex = FALSE)

Wipes a part of or the entire search index.

Übergabeparameter

$sid (optional) The SID of the item to wipe. If specified, $type must be passed too.

$type (optional) The type of item to wipe.

▾ 4 functions call search_wipe()

node_delete in modules/node/node.module
Delete a node.
search_admin_settings_validate in modules/search/search.admin.inc
Validate callback.
search_index in modules/search/search.module
Update the full-text search index for a particular item.
search_wipe_confirm_submit in modules/search/search.admin.inc
Handler for wipe confirmation

Code

modules/search/search.module, line 231

<?php
function search_wipe($sid = NULL, $type = NULL, $reindex = FALSE) {
  if ($type == NULL && $sid == NULL) {
    module_invoke_all('search', 'reset');
  }
  else {
    db_query("DELETE FROM {search_dataset} WHERE sid = %d AND type = '%s'", $sid, $type);
    db_query("DELETE FROM {search_index} WHERE sid = %d AND type = '%s'", $sid, $type);
    // Don't remove links if re-indexing.
    if (!$reindex) {
      db_query("DELETE FROM {search_node_links} WHERE sid = %d AND type = '%s'", $sid, $type);
    }
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen