Config Files

Opensolr Config Files — find answers to your questions

API - Delete configuration file

Deletes one configuration file from your Opensolr Index, for example a word list you no longer use.

Endpointhttps://opensolr.com/solr_manager/api/delete_config_file
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.

01 · Parameters

core_nameRequired

The name of your index.

file_nameRequired

The name without its extension, for example stopwords_fr.

file_extensionRequired

The extension, for example txt.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/delete_config_file?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&file_name=stopwords_fr&file_extension=txt"
schema.xml and solrconfig.xml cannot be deleted: the index needs them to start. Delete a file only when nothing in schema.xml or solrconfig.xml points to it any more.

03 · Answer

status is true and msg holds the answer of the server. On a cluster master, the file is deleted on every replica too.

04 · Errors

ERROR_CAN_NOT_DELETE_SCHEMA_OR_SOLRCONFIGHTTP 200

You asked to delete schema or solrconfig.

ERROR_NOT_CORE_OWNERHTTP 200

The index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

List the files first: get_all_config_files.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.

Read Full Answer

API - Get configuration file

Reads one configuration file of your Opensolr Index and gives you its content.

Endpointhttps://opensolr.com/solr_manager/api/get_file
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.

01 · Parameters

core_nameRequired

The name of your index (index_name works too).

file_nameRequired

The name without its extension, for example schema.

file_extensionRequired

The extension, for example xml.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/get_file?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&file_name=schema&file_extension=xml"

03 · Answer

{
    "status": true,
    "msg": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> <schema name=\"my_index\" version=\"1.6\"> ..."
}

04 · Errors

ERROR_INVALID_CORE_NAMEHTTP 200

No index name, or the index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

List the files: get_all_config_files. Change one: upload_config_file.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.

Read Full Answer

API - Get all the Solr configuration files list

Lists the names of every configuration file of your Opensolr Index.

Endpointhttps://opensolr.com/solr_manager/api/get_all_config_files
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.

01 · Parameters

core_nameRequired

The name of your index.

02 · Example

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

03 · Answer

{
    "status": true,
    "msg": "[\"schema.xml\",\"solrconfig.xml\",\"synonyms.txt\",\"stopwords.txt\",\"protwords.txt\"]"
}
msg is a string that holds a JSON list: decode it a second time to get the file names.

04 · Errors

ERROR_NOT_CORE_OWNERHTTP 200

The index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

Read one file: get_file. Upload one: upload_config_file.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.

Read Full Answer

Loading more articles...