I have to extract rich document and commit using solarium Client php for Apache Solr; in the documentation of solarium Curl is default Adapter then i dont need:
$client->setAdapter('Solarium\Core\Client\Adapter\Curl');
Then I want to force the connection to explicitly close when it has finished processing , Curl will just open another connection when that happens; for that i try this code:
$ch = curl_init();
$headers=array('Content-Type:multipart/form-data',
'Connection: Keep-Alive',
'Keep-Alive: 300');
curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
finally execute request:
$query->setDocument($doc);
$request = $client->createRequest($query);
$result = $client->executeRequest($request);
But after 30 second time out stop the process of indexing .