Config Files

Opensolr Config Files — find answers to your questions

API - Delete configuration file

API Endpoint

Delete Configuration File

Delete a specific configuration file from your Opensolr index. Specify the file name and extension separately.

Endpoint

GET https://opensolr.com/solr_manager/api/delete_config_file

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
index_namerequiredThe name of your Opensolr index
file_namerequiredThe name of the config file to delete, without the file extension (e.g. schema)
file_extensionrequiredThe file extension, without the period (e.g. xml)
Caution: Deleting essential config files like schema.xml or solrconfig.xml will prevent your index from loading. Make sure you have a backup or replacement ready before deleting critical files.

Code Examples

$_ cURL

curl -s "https://opensolr.com/solr_manager/api/delete_config_file?email=YOUR_EMAIL&api_key=YOUR_API_KEY&index_name=YOUR_INDEX&file_name=schema&file_extension=xml"

PHP PHP

$params = http_build_query([
    'email'          => 'YOUR_EMAIL',
    'api_key'        => 'YOUR_API_KEY',
    'index_name'     => 'YOUR_INDEX',
    'file_name'      => 'schema',
    'file_extension' => 'xml',
]);
$response = json_decode(file_get_contents(
    'https://opensolr.com/solr_manager/api/delete_config_file?' . $params
), true);
print_r($response);

Py Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/delete_config_file",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "index_name": "YOUR_INDEX",
        "file_name": "schema",
        "file_extension": "xml",
    }
)
data = response.json()
print(data)

Related Documentation

Get Config File

Download a specific configuration file from your index.

List Config Files

Get a list of all configuration files on your index.

Upload Config File

Upload or update a single configuration file.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer

API - Get configuration file

API Endpoint

Get Configuration File

Download a specific configuration file from your Opensolr index. Returns the raw file content. Specify the file name and extension separately.

Endpoint

GET https://opensolr.com/solr_manager/api/get_file

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
index_namerequiredThe name of your Opensolr index
file_namerequiredThe name of the config file to retrieve, without the file extension (e.g. schema)
file_extensionrequiredThe file extension, without the period (e.g. xml)

Code Examples

$_ cURL

# Download schema.xml and save to a local file
curl -s "https://opensolr.com/solr_manager/api/get_file?email=YOUR_EMAIL&api_key=YOUR_API_KEY&index_name=YOUR_INDEX&file_name=schema&file_extension=xml" -o schema.xml

PHP PHP

$params = http_build_query([
    'email'          => 'YOUR_EMAIL',
    'api_key'        => 'YOUR_API_KEY',
    'index_name'     => 'YOUR_INDEX',
    'file_name'      => 'schema',
    'file_extension' => 'xml',
]);
$content = file_get_contents(
    'https://opensolr.com/solr_manager/api/get_file?' . $params
);
// Save to local file
file_put_contents('schema.xml', $content);
echo "File saved to schema.xml\n";

Py Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/get_file",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "index_name": "YOUR_INDEX",
        "file_name": "schema",
        "file_extension": "xml",
    }
)
# Save to local file
with open("schema.xml", "w") as f:
    f.write(response.text)
print("File saved to schema.xml")

Related Documentation

List Config Files

Get a list of all configuration files on your index.

Upload Config File

Upload or update a single configuration file.

Delete Config File

Delete a configuration file from your index.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer

API - Get all the Solr configuration files list

API Endpoint

Get All Configuration Files List

Retrieve a list of all configuration files present on your Opensolr index. Use this to see which config files are available before downloading or modifying them.

Endpoint

GET https://opensolr.com/solr_manager/api/get_all_config_files

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
core_namerequiredThe name of your Opensolr index

Code Examples

$_ cURL

curl -s "https://opensolr.com/solr_manager/api/get_all_config_files?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=YOUR_INDEX"

PHP PHP

$params = http_build_query([
    'email'     => 'YOUR_EMAIL',
    'api_key'   => 'YOUR_API_KEY',
    'core_name' => 'YOUR_INDEX',
]);
$response = json_decode(file_get_contents(
    'https://opensolr.com/solr_manager/api/get_all_config_files?' . $params
), true);
print_r($response);

Py Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/get_all_config_files",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "core_name": "YOUR_INDEX",
    }
)
data = response.json()
print(data)

Related Documentation

Get Config File

Download a specific configuration file from your index.

Upload Config File

Upload or update a single configuration file.

Upload Config Zip

Upload multiple config files at once as a zip archive.

Config File Guide

Understand how Solr configuration files work together.

Need help with your Solr configuration? We can help.

Contact Support
Read Full Answer

Loading more articles...