Issue:
How can I use aliases to switch between hot and cold collections?
Environment:
Fusion
Resolution:
Use case:
Aliases are used for switching between hot and cold collections.
Alias in Solr:
Collection aliases are only available when using SolrCloud mode and are manipulated via a simple HTTP API:
-
Create/Update
http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=AliasName&collection=ListOfCollections
-
Delete
http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=AliasName
You can also use the Solr Admin UI to create an alias. Follow these steps:
- Access the Solr Admin UI in your web browser.
- Navigate to the "Collections" section.
- Click on the "Aliases" tab.
- Click the "Add Alias" button.
- Provide the alias name and select the collection you want to associate with the alias.
- Save the alias.
More Documentation:
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api4
Create an alias in fusion
curl -u user:pass -X PUT -H 'Content-type: application/json' -d '{"solrParams":{"name":"MYSOLRCOLLECTION"}}' http://localhost:8764/api/apollo/collections/myFusionCollection
You need to tell the Fusion collection to point to another Solr collection 'MYSOLRCOLLECTION' with a PUT.
This is equivalent to using the Solr collection API to update the alias.
Cause:
N/A
Comments
0 comments
Please sign in to leave a comment.