Skip to content

Instantly share code, notes, and snippets.

@basdenooijer
Created February 22, 2011 10:20
Show Gist options
  • Save basdenooijer/838471 to your computer and use it in GitHub Desktop.
Save basdenooijer/838471 to your computer and use it in GitHub Desktop.
Solarium ping example
<?php
$client = new Solarium_Client;
$client->setHost('127.0.0.1');
$client->setPort(8983);
$client->setPath('/solr/');
$client->setCore('core0');
$query = new Solarium_Query_Ping;
$result = $client->ping($query);
// this will be 200 in case of a succesful ping
echo $result->getStatus();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment