You are here

protected function Database::getIndexDbInfo in Search API 8

Retrieves the database info for the given index.

Parameters

\Drupal\search_api\IndexInterface $index: The search index.

Return value

array The index data from the key-value store.

13 calls to Database::getIndexDbInfo()
Database::createDbCondition in modules/search_api_db/src/Plugin/search_api/backend/Database.php
Creates a database query condition for a given search filter.
Database::createDbQuery in modules/search_api_db/src/Plugin/search_api/backend/Database.php
Creates a database query for a search.
Database::createKeysQuery in modules/search_api_db/src/Plugin/search_api/backend/Database.php
Creates a SELECT query for given search keys.
Database::deleteAllIndexItems in modules/search_api_db/src/Plugin/search_api/backend/Database.php
Deletes all the items from the index.
Database::deleteItems in modules/search_api_db/src/Plugin/search_api/backend/Database.php
Deletes the specified items from the index.

... See full list

File

modules/search_api_db/src/Plugin/search_api/backend/Database.php, line 2845

Class

Database
Indexes and searches items using the database.

Namespace

Drupal\search_api_db\Plugin\search_api\backend

Code

protected function getIndexDbInfo(IndexInterface $index) {
  $db_info = $this
    ->getKeyValueStore()
    ->get($index
    ->id(), []);
  if ($db_info && $db_info['server'] != $this->server
    ->id()) {
    return [];
  }
  return $db_info;
}