/**
* Open Sphinx persistent connection.
*
* @throws ESphinxException if client is already connected.
* @throws ESphinxException if client has connection error.
* @link http://sphinxsearch.com/docs/current.html#api-func-open
*/
public function openConnection()
{
if ($this->isConnected) {
throw new ESphinxException("Sphinx client is already opened");
}
$this->sphinxClient->Open();
if ($this->sphinxClient->IsConnectError()) {
throw new ESphinxException("Sphinx exception: " . $this->sphinxClient->GetLastError());
}
$this->isConnected = true;
}