API Endpoint
Replicate Solr Index
Set up replication from a master index to a target replica index. Both indexes must already exist before you can configure replication between them.
Endpoint
GET https://opensolr.com/solr_manager/api/replicate_index
Parameters
| Parameter | Status | Description |
|---|---|---|
email | required | Your Opensolr registration email address |
api_key | required | Your Opensolr API key |
index_name | required | The name of the master index (must already exist) |
target_index | required | The name of the target replica index (must already exist) |
Note: Both the master and target indexes must be created first using the Create Index endpoint. The replica will poll the master for updates automatically.
Code Examples
cURL
curl -s "https://opensolr.com/solr_manager/api/replicate_index?email=YOUR_EMAIL&api_key=YOUR_API_KEY&index_name=master_index&target_index=replica_index"
PHP
$params = http_build_query([ 'email' => 'YOUR_EMAIL', 'api_key' => 'YOUR_API_KEY', 'index_name' => 'master_index', 'target_index' => 'replica_index', ]); $response = json_decode(file_get_contents( 'https://opensolr.com/solr_manager/api/replicate_index?' . $params ), true); print_r($response);
Python
import requests response = requests.get( "https://opensolr.com/solr_manager/api/replicate_index", params={ "email": "YOUR_EMAIL", "api_key": "YOUR_API_KEY", "index_name": "master_index", "target_index": "replica_index", } ) data = response.json() print(data)
Related Documentation
Replication Guide
Complete guide to Opensolr manual index replication.
Create Index
Create new indexes for master and replica.
Create Cluster
Create a Resilient Cluster with automatic failover.
Need help setting up replication or a Resilient Cluster? We are here to help.
Contact Support