You are here

function search_api_index_status in Search API 7

Determines a search index' indexing status.

Parameters

SearchApiIndex $index: The index whose indexing status should be determined.

Return value

array An associative array containing two keys (in this order):

  • indexed: The number of items already indexed in their latest version.
  • total: The total number of items that have to be indexed for this index.
2 calls to search_api_index_status()
drush_search_api_status in ./search_api.drush.inc
Display index status.
search_api_admin_index_view in ./search_api.admin.inc
Page callback for displaying an index's status.

File

./search_api.module, line 2858
Provides a flexible framework for implementing search services.

Code

function search_api_index_status(SearchApiIndex $index) {
  return $index
    ->datasource()
    ->getIndexStatus($index);
}