Send a Solr command
import requests
url = "https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}{
"responseHeader": {
"status": 0,
"QTime": 1
},
"solr-mbeans": [
"CORE",
{
"searcher": {
"class": "org.apache.solr.search.SolrIndexSearcher",
"version": "1.0",
"description": "index searcher",
"src": null
},
"core": {
"class": "collection1",
"version": "1.0",
"description": "SolrCore",
"src": null
},
"Searcher@435cf502[collection1] main": {
"class": "org.apache.solr.search.SolrIndexSearcher",
"version": "1.0",
"description": "index searcher",
"src": null
}
}
]
}Send a Solr command
Issue a Solr command to the search cluster.
Note that because one searchCluster may host several collections, it is not recommended to use this with a collection-level command (such as a query, or document update).
GET
/
solrAdmin
/
{solrApiPath}
/
{path}
Send a Solr command
import requests
url = "https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request GET \
--url https://{FUSION HOST}/api/solrAdmin/{solrApiPath}/{path}{
"responseHeader": {
"status": 0,
"QTime": 1
},
"solr-mbeans": [
"CORE",
{
"searcher": {
"class": "org.apache.solr.search.SolrIndexSearcher",
"version": "1.0",
"description": "index searcher",
"src": null
},
"core": {
"class": "collection1",
"version": "1.0",
"description": "SolrCore",
"src": null
},
"Searcher@435cf502[collection1] main": {
"class": "org.apache.solr.search.SolrIndexSearcher",
"version": "1.0",
"description": "index searcher",
"src": null
}
}
]
}Was this page helpful?
⌘I