[英]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/ 我正在使用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. 因为每当Solr(webSolr)无法访问时,我遇到问题即使
$solr->search()
调用在Try Catch块中。
always PING
solr server before any insert/select/update/delete
request 在任何
insert/select/update/delete
请求之前总是PING
solr服务器
$solr = new Apache_Solr_Service($hostname, $portname,$core);
if(!$solr->ping())
{
echo "server not responding";
exit;
}
$solr->search($basicQuery, $start_limit,$end_limit,$params);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.