PHP 8.5.0 Beta 1 available for testing

Voting

: max(zero, five)?
(Example: nine)

The Note You're Voting On

tomanr1 at wp dot pl
11 years ago
In case someone would like to use this solrClient with solr v.4.0 and higher i've prepared my own commit function

class solr {
public function delete($query ) {
$this->_client->deleteByQuery($query);
$this->commit();
}

public function commit() {
$solrConfig= // array with solr host, port, path to collection (/solr/my_collection),
$solrAddress = $solrConfig['hostname'] . ':' . $solrConfig['port'] . $solrConfig['path'];
$output = array();
$response = exec('curl ' . $solrAddress . '/update?commit=true', $output);
return $output;
}
}

<< Back to user notes page

To Top