You are here

public function IndexInterface::indexItems in Search API 8

Indexes a set amount of items.

Will fetch the items to be indexed from the datasources and send them to indexItems(). It will then mark all successfully indexed items as such in the datasource.

Parameters

int $limit: (optional) The maximum number of items to index, or -1 to index all items.

string|null $datasource_id: (optional) If specified, only items of the datasource with that ID are indexed. Otherwise, items from any datasource are indexed.

Return value

int The number of items successfully indexed.

2 methods override IndexInterface::indexItems()
Index::indexItems in src/Entity/Index.php
Indexes a set amount of items.
UnsavedIndexConfiguration::indexItems in src/UnsavedIndexConfiguration.php
Indexes a set amount of items.

File

src/IndexInterface.php, line 593

Class

IndexInterface
Defines the interface for index entities.

Namespace

Drupal\search_api

Code

public function indexItems($limit = -1, $datasource_id = NULL);