import requests
url = "https://{FUSION_HOST}/api/collections"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION_HOST}/api/collections")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION_HOST}/api/collections', 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/collections")
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/collections"
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/collections",
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/collections[
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"searchClusterId": "<string>",
"autoCommit": 15,
"autoSoftCommit": false,
"commitWithin": 10000,
"features": {},
"compositeIdSpec": {
"routeKey1Field": "<string>",
"routeKey1Bits": 123,
"routeKey2Field": "<string>",
"routeKey2Bits": 123
},
"solrParams": {
"name": "<string>",
"numShards": 123,
"replicationFactor": 123,
"collection.configName": "<string>"
},
"modifiedAt": "2023-11-07T05:31:56Z",
"type": "DATA",
"relatedCollectionId": "<string>",
"metadata": {}
}
]List all collections
Return properties for all existing collections.
import requests
url = "https://{FUSION_HOST}/api/collections"
response = requests.get(url)
print(response.text)HttpResponse<String> response = Unirest.get("https://{FUSION_HOST}/api/collections")
.asString();const options = {method: 'GET'};
fetch('https://{FUSION_HOST}/api/collections', 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/collections")
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/collections"
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/collections",
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/collections[
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"searchClusterId": "<string>",
"autoCommit": 15,
"autoSoftCommit": false,
"commitWithin": 10000,
"features": {},
"compositeIdSpec": {
"routeKey1Field": "<string>",
"routeKey1Bits": 123,
"routeKey2Field": "<string>",
"routeKey2Bits": 123
},
"solrParams": {
"name": "<string>",
"numShards": 123,
"replicationFactor": 123,
"collection.configName": "<string>"
},
"modifiedAt": "2023-11-07T05:31:56Z",
"type": "DATA",
"relatedCollectionId": "<string>",
"metadata": {}
}
]Response
successful operation
Solr hard commit inherited from the collection's solrconfig.xml that is designated as Fusion's default parameter for Solr data commits. Number of seconds in which the data is saved, but this parameter does not force the search results to refresh immediately. With this setting, search performance is not slowed, but the new data may not show in search results until the next refresh. Default value is 15.
Solr's commitWithin parameter, configured at the collection level with a default of 10000 milliseconds, ensures data is committed and available for searching within 10 seconds. The default for signals collections is 1000 milliseconds. Fusion uses commitWithin to avoid relying on specific Solr-side configurations. The com.lucidworks.apollo.solr.commitWithin global property defines the default commitWithin for all documents added through Fusion. When you create a new collection in Fusion, its per-collection commitWithin is initialized from this global default.
Was this page helpful?