\Apache_Solr_Service

Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.

Example Usage:
<code>
...
$solr = new Apache_Solr_Service(); //or explicitly new Apache_Solr_Service('localhost', 8180, '/solr')

if ($solr->ping())
{
$solr->deleteByQuery('*:*'); //deletes ALL documents - be careful :)

$document = new Apache_Solr_Document();
$document->id = uniqid(); //or something else suitably unique

$document->title = 'Some Title';
$document->content = 'Some content for this wonderful document. Blah blah blah.';

$solr->addDocument($document); //if you're going to be adding documents in bulk using addDocuments
//with an array of documents is faster

$solr->commit(); //commit to see the deletes and the document
$solr->optimize(); //merges multiple segments into one

//and the one we all care about, search!
//any other common or custom parameters to the request handler can go in the
//optional 4th array argument.
$solr->search('content:blah', 0, 10, array('sort' => 'timestamp desc'));
}
...
</code>