Skip to main content
GET
/
solr
/
{collection}
/
{path}
Send a GET request to Solr
import requests

url = "https://{FUSION HOST}/api/solr/{collection}/{path}"

payload = {}
headers = {"Content-Type": "*/*"}

response = requests.get(url, json=payload, headers=headers)

print(response.text)
HttpResponse<String> response = Unirest.get("https://{FUSION HOST}/api/solr/{collection}/{path}")
.header("Content-Type", "*/*")
.body("{}")
.asString();
const options = {method: 'GET', headers: {'Content-Type': '*/*'}, body: JSON.stringify({})};

fetch('https://{FUSION HOST}/api/solr/{collection}/{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/solr/{collection}/{path}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = '*/*'
request.body = "{}"

response = http.request(request)
puts response.read_body
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{FUSION HOST}/api/solr/{collection}/{path}"

payload := strings.NewReader("{}")

req, _ := http.NewRequest("GET", url, payload)

req.Header.Add("Content-Type", "*/*")

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/solr/{collection}/{path}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([

]),
CURLOPT_HTTPHEADER => [
"Content-Type: */*"
],
]);

$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/solr/{collection}/{path} \
--header 'Content-Type: */*' \
--data '{}'
{
  "responseHeader": {
    "status": 0,
    "QTime": 2,
    "params": {
      "fl": "title",
      "q": "solr",
      "wt": "json",
      "rows": "2"
    }
  },
  "response": {
    "numFound": 52,
    "start": 0,
    "docs": [
      {
        "title": [
          "Solr and SolrAdmin APIs - Fusion Documentation - Lucidworks"
        ]
      },
      {
        "title": [
          "Search Clusters - Fusion Documentation - Lucidworks"
        ]
      }
    ]
  }
}

Path Parameters

collection
string
required

The collection ID.

path
string
required

The Solr command path.

Pattern: .*

Body

*/*

The body is of type object.

Response

200 - application/json

Successful Solr response. The structure depends on the request path and handler, such as /select or /update.

Arbitrary Solr response content depending on the handler invoked.