You are here

public function SearchApiElasticsearchIndex::indexItems in Search API Elasticsearch 7.2

Add documents to Elasticsearch index.

Parameters

$documents:

Return value

array

File

includes/SearchApiElasticsearchIndex.inc, line 110

Class

SearchApiElasticsearchIndex

Code

public function indexItems($documents) {
  $index = $this
    ->getRealIndex();
  $index
    ->addDocuments($documents);
  $index
    ->refresh();
  return array_keys($documents);
}