You are here

protected function ExampleContentTrait::indexItems in Search API 8

Indexes all (unindexed) items on the specified index.

Parameters

string $index_id: The ID of the index on which items should be indexed.

Return value

int The number of successfully indexed items.

22 calls to ExampleContentTrait::indexItems()
AutocompleteTest::setUp in modules/search_api_db/tests/src/Kernel/AutocompleteTest.php
BackendTest::editServerMinChars in modules/search_api_db/tests/src/Kernel/BackendTest.php
Edits the server to change the "Minimum word length" setting.
BackendTest::regressionTest2873023 in modules/search_api_db/tests/src/Kernel/BackendTest.php
Tests whether keywords with special characters work correctly.
BackendTest::regressionTest2916534 in modules/search_api_db/tests/src/Kernel/BackendTest.php
Tests edge cases for partial matching.
BackendTest::regressionTest2925464 in modules/search_api_db/tests/src/Kernel/BackendTest.php
Tests changing of field types.

... See full list

File

tests/src/Functional/ExampleContentTrait.php, line 127

Class

ExampleContentTrait
Contains helpers to create data that can be used by tests.

Namespace

Drupal\Tests\search_api\Functional

Code

protected function indexItems($index_id) {

  /** @var \Drupal\search_api\IndexInterface $index */
  $index = Index::load($index_id);
  return $index
    ->indexItems();
}