You are here

public function SearchApiSolrConnectionInterface::addDocuments in Search API Solr 7

Adds an array of Solr Documents to the index all at once

Parameters

array $documents: Should be an array of ApacheSolrDocument instances

bool $overwrite: (optional) Set whether existing documents with the same IDs should be overwritten. Defaults to TRUE.

bool $commitWithin: (optional) The time in which the indexed documents should be committed to the index, in milliseconds. This works in addition to the Solr server's auto commit settings. Defaults to no additional handling.

Return value

object A response object.

Throws

SearchApiException If an error occurs during the service call.

1 method overrides SearchApiSolrConnectionInterface::addDocuments()
SearchApiSolrConnection::addDocuments in includes/solr_connection.inc
Adds an array of Solr Documents to the index all at once

File

includes/solr_connection.interface.inc, line 190

Class

SearchApiSolrConnectionInterface
The interface for a Solr connection class.

Code

public function addDocuments(array $documents, $overwrite = NULL, $commitWithin = NULL);