You are here

public function AdvancedHelpSearch::indexClear in Advanced Help 8

Clears the search index for this plugin.

When a request is made to clear all items from the search index related to this plugin, this method will be called. If this plugin uses the default search index, this method can call clear($type) method on the search.index service class to remove indexed items from the search database.

Overrides SearchIndexingInterface::indexClear

See also

\Drupal\search\SearchIndexInterface::clear()

File

src/Plugin/Search/AdvancedHelpSearch.php, line 253

Class

AdvancedHelpSearch
Executes a keyword search for Advanced Help against the {advanced_help} topic pages.

Namespace

Drupal\advanced_help\Plugin\Search

Code

public function indexClear() {
  if (floatval(\Drupal::VERSION) >= 8.800000000000001) {
    $this->searchIndex
      ->clear($this
      ->getPluginId());
  }
  else {
    search_index_clear($this
      ->getPluginId());
  }
}