You are here

protected function SearchApiAlgoliaBackend::indexItem in Search API Algolia 8

Same name and namespace in other branches
  1. 3.0.x src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::indexItem()
  2. 2.0.x src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::indexItem()

Indexes a single item on the specified index.

Parameters

\Drupal\search_api\IndexInterface $index: The index for which the item is being indexed.

\Drupal\search_api\Item\ItemInterface $item: The item to index.

File

src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php, line 240

Class

SearchApiAlgoliaBackend
Class SearchApiAlgoliaBackend.

Namespace

Drupal\search_api_algolia\Plugin\search_api\backend

Code

protected function indexItem(IndexInterface $index, ItemInterface $item) {
  $this
    ->indexItems([
    $item
      ->getId() => $item,
  ]);
}