Issue
On a restore in Solr, you need to restore to a different collection than the one in existence that you took the backup with. This can be a problem, however, with Fusion since it uses a configuration to point to the existing collection.
Environment
Fusion, Solr
Resolution
The resolution to this problem is to update the Fusion Collection information with the collection name of the restored collection. So you would do a REST call to:
cmd> curl -u admin http://localhost:8764/api/collections/[collection-name]
{
"id" : "test",
"createdAt" : "2020-09-30T00:01:45.103Z",
"searchClusterId" : "default",
"commitWithin" : 10000,
"solrParams" : {
"name" : "test",
"numShards" : 1,
"replicationFactor" : 1
},
"type" : "DATA",
"metadata" : { }
By modifying the collection information in the solrParams with the updated name of the restored collection, everything will continue to work against the newly restored collection. So you'd do a PUT like the following:
cmd> curl -H "Content-type: application/json" -X PUT -u admin http://localhost:8764/api/collections/[collection-name] -d '
{
"id" : "test",
"solrParams" : {
"name" : "test-restored",
"numShards" : 1,
"replicationFactor" : 1
},
"type" : "DATA",
"metadata" : { }'
Do not use Solr Aliases to do this. Fusion does not play well with Solr Aliases, so the correct way of going about this is to update the Fusion solrParams configuration for it's collection-name.
Comments
0 comments
Article is closed for comments.