Issue:
Most of our clients have encountered a situation where their auxiliary collections were deleted either accidentally or due to the collection being in an unhealthy state.
Goal:
This article will help in re-creating the auxiliary collection and associate them to the primary collection.
Environment:
Works from Fusion 4.2.x and above
Guide:
- Every primary collection is associated with a set of auxiliary collections that contain related data, such as signals, aggregations, and more.
- Some auxiliary collections are created for every primary collection. Others are created only for the app’s default collection, one per app.
Resolution:
Below mentioned API end points along with the payload will help you re-create the auxiliary collections and associate them with the primary collection.
-
- API to recreate query_rewrite & query_rewrite_staging collection and associate them to the primary collection.
Request x : POST
Authorization : Basic Auth
Content-type : application/json
API end point : http://FUSIONHOST:PORT/api/apps/<YOURAPP>/collections/
Payload :
//payload for query_rewrite
{
"id": "YOURPRIMARYCOLLECTION_query_rewrite",
"createdAt": "2023-12-12T11:30:24.318Z",
"searchClusterId": "default",
"commitWithin": 10000,
"solrParams": {
"numShards": 1,
"replicationFactor": 1,
"configTemplate": "solr/conf/query_rewrite.zip"
},
"type": "QUERY_REWRITE",
"relatedCollectionId": "YOURPRIMARYCOLLECTION",
"metadata": {}
}
//payload for query_rewrite_staging
{
"id": "YOURPRIMARYCOLLECTION_query_rewrite_staging",
"createdAt": "2023-12-12T11:30:24.318Z",
"searchClusterId": "default",
"commitWithin": 10000,
"solrParams": {
"numShards": 1,
"replicationFactor": 1,
"configTemplate": "solr/conf/query_rewrite.zip"
},
"type": "QUERY_REWRITE",
"relatedCollectionId": "YOURPRIMARYCOLLECTION",
"metadata": {}
}
- API to recreate query_rewrite & query_rewrite_staging collection and associate them to the primary collection.
-
API to recreate job_reports & user_prefs collection and associate them to the primary collection.
Request method : PUT
Authorization : Basic Auth
Content-type : application/json
API end point : http://FUSIONHOST:PORT/api/apps/<YOURAPP>/collections/<COLLECTIONNAME>_user_prefs
Payload :
//payload for USER_PREFS
{
"solrParams": {
"numShards": 1,
"replicationFactor": 1
},
"type": "USER_PREFS",
"relatedCollectionId": "Rtest"
}
//payload for JOB_REPORTS
{
"solrParams": {
"numShards": 1,
"replicationFactor": 1
},
"type": "JOB_REPORTS",
"relatedCollectionId": "Rtest"
}
Comments
0 comments
Article is closed for comments.