1

I am using solr-php-client https://code.google.com/p/solr-php-client/

Does it have a timeout option that I can manually set? Because whenever Solr (webSolr) is unreachable, I'm having problems Even if the $solr->search() call is within a Try Catch block.

4

1 回答 1

4

在任何请求之前总是PINGsolr 服务器insert/select/update/delete

 $solr = new Apache_Solr_Service($hostname, $portname,$core);

 if(!$solr->ping())
 {
    echo "server not responding";
    exit;
 }

 $solr->search($basicQuery, $start_limit,$end_limit,$params);
于 2013-04-11T14:02:58.423 回答