Php 如果无法访问Solr,Apache Solr是否有超时?
我正在使用SolrPHP客户端 它是否有我可以手动设置的超时选项? 因为无论何时无法访问Solr(webSolr),我都会遇到问题Php 如果无法访问Solr,Apache Solr是否有超时?,php,solr,Php,Solr,我正在使用SolrPHP客户端 它是否有我可以手动设置的超时选项? 因为无论何时无法访问Solr(webSolr),我都会遇到问题 即使$solr->search()调用在Try-Catch块内。在任何插入/选择/更新/删除请求之前始终PINGsolr服务器 $solr = new Apache_Solr_Service($hostname, $portname,$core); if(!$solr->ping()) { echo "server not responding
即使
$solr->search()
调用在Try-Catch块内。在任何插入/选择/更新/删除请求之前始终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);
在任何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);
那么ping函数有一个超时?大约多少?默认设置为2s。如果你想定制它,请在第二秒内用ping函数作为参数传递。喜欢持续30秒$solr->ping(30)
那么ping函数有一个超时?大约多少?默认设置为2s。如果你想定制它,请在第二秒内用ping函数作为参数传递。喜欢持续30秒$solr->ping(30)