You are here

public function SearchApiSolrConnection::commit in Search API Solr 7

Sends a commit command to the Solr server.

Will be synchronous unless $waitSearcher is set to FALSE.

Parameters

bool $waitSearcher: (optional) Wait until a new searcher is opened and registered as the main query searcher, making the changes visible. Defaults to true.

int|false $timeout: Seconds to wait until timing out with an exception. Defaults to an hour.

Return value

object A response object.

Throws

SearchApiException If an error occurs during the service call.

Overrides SearchApiSolrConnectionInterface::commit

File

includes/solr_connection.inc, line 803

Class

SearchApiSolrConnection
Represents a Solr server resource.

Code

public function commit($waitSearcher = TRUE, $timeout = 3600) {
  return $this
    ->optimizeOrCommit('commit', $waitSearcher, $timeout);
}