简体   繁体   中英

Does Apache-Solr have a timeout if Solr is not reachable?

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.

always PING solr server before any insert/select/update/delete request

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

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

 $solr->search($basicQuery, $start_limit,$end_limit,$params);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM