我想从URL提取json数据,但出现500错误,我不了解solr。如何解决这个问题?
$json_url = "http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS";
$crl = curl_init();
curl_setopt($crl, CURLOPT_URL, $json_url);
curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crl, CURLOPT_SSL_VERIFYPEER, FALSE);
$json = curl_exec($crl);
curl_close($crl);
$clusterStatus = json_decode($json, TRUE);
echo $clusterStatus;
控制台错误-无法加载资源:服务器的状态为500(内部服务器错误)
以下我想在结果上回显的数据。
"responseHeader": {
"status": 0,
"QTime": 1
},
"cluster": {
"collections": {
"abc": {
"pullReplicas": "0",
"replicationFactor": "1",
"shards": {
"shard1": {
"range": "80000000-7fffffff",
"state": "active",
"replicas": {
"core_node2": {
"core": "abc_shard1_replica_n1",
"base_url": "http://192.168.43.75:8983/solr",
"node_name": "192.168.43.75:8983_solr",
"state": "active",
"type": "NRT",
"force_set_state": "false",
"leader": "true"
},
"core_node4": {
"core": "abc_shard1_replica_n3",
"base_url": "http://192.168.43.75:8983/solr",
"node_name": "192.168.43.75:8983_solr",
"state": "active",
"type": "NRT",