public function UnsavedIndexConfiguration::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.
Overrides IndexInterface::indexItems
File
- src/
UnsavedIndexConfiguration.php, line 541
Class
- UnsavedIndexConfiguration
- Represents a configuration of an index that was not yet permanently saved.
Namespace
Drupal\search_apiCode
public function indexItems($limit = -1, $datasource_id = NULL) {
return $this->entity
->indexItems($limit, $datasource_id);
}