You are here

protected function FacetsTest::indexItems in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/FacetsTest.php \Drupal\Tests\search_api_solr\Functional\FacetsTest::indexItems()
  2. 8 tests/src/Functional/FacetsTest.php \Drupal\Tests\search_api_solr\Functional\FacetsTest::indexItems()
  3. 8.2 tests/src/Functional/FacetsTest.php \Drupal\Tests\search_api_solr\Functional\FacetsTest::indexItems()

Indexes all (unindexed) items on the specified index.

Return value

int The number of successfully indexed items.

Throws

\Drupal\search_api\SearchApiException

1 call to FacetsTest::indexItems()
FacetsTest::testFacets in tests/src/Functional/FacetsTest.php
Tests basic facets integration.

File

tests/src/Functional/FacetsTest.php, line 103

Class

FacetsTest
Tests the facets functionality using the Solr backend.

Namespace

Drupal\Tests\search_api_solr\Functional

Code

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