You are here

protected function SolrBackendTestBase::indexItems in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::indexItems()
  2. 4.x tests/src/Kernel/SolrBackendTestBase.php \Drupal\Tests\search_api_solr\Kernel\SolrBackendTestBase::indexItems()

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.

Overrides ExampleContentTrait::indexItems

9 calls to SolrBackendTestBase::indexItems()
SearchApiSolrLocationTest::commonSolrBackendSetUp in tests/src/Kernel/SearchApiSolrLocationTest.php
Required parts of the setUp() function that are the same for all backends.
SearchApiSolrMultilingualTest::testLanguageFallback in tests/src/Kernel/SearchApiSolrMultilingualTest.php
Tests language fallback.
SearchApiSolrMultilingualTest::testLanguageLimitedByOptions in tests/src/Kernel/SearchApiSolrMultilingualTest.php
Tests language limiting via options.
SearchApiSolrTest::testAutocomplete in tests/src/Kernel/SearchApiSolrTest.php
Tests the autocomplete support.
SearchApiSolrTest::testDatasourceAdditionAndDeletion in tests/src/Kernel/SearchApiSolrTest.php
Tests addition and deletion of a data source.

... See full list

File

tests/src/Kernel/SolrBackendTestBase.php, line 95

Class

SolrBackendTestBase
Tests location searches and distance facets using the Solr search backend.

Namespace

Drupal\Tests\search_api_solr\Kernel

Code

protected function indexItems($index_id) {
  $index_status = parent::indexItems($index_id);
  $index = Index::load($index_id);
  $this
    ->ensureCommit($index
    ->getServerInstance());
  return $index_status;
}