Duplicating a Collection and Creating an Alias
TLDR Gabe wanted to duplicate a collection and create an alias. Jason suggested exporting old documents and importing them into a new collection.
Powered by Struct AI
1
7
31mo
Solved
Jun 24, 2021 (31 months ago)
Gabe
Gabe
06:32 PMis there any way to duplicate a collection, so I can create an alias.
• I have one collection called
• I'd like to duplicate this to
• drop the original
• then alias
Jason maybe y'all have some way to easily achieve this on the backend?
• I have one collection called
lists
• I'd like to duplicate this to
lists-<TIME>
• drop the original
lists
• then alias
lists=>lists-<TIME>
Jason maybe y'all have some way to easily achieve this on the backend?
Jason
Jason
07:10 PMOne way to do this would be to use the documents/export endpoint on the old collection and then send the output to the documents/import endpoint of the new collection
Jun 25, 2021 (31 months ago)
Gabe
Gabe
07:56 PMgotcha, so I need to use the same schema to create a new collection, then export from old & import to new?
Can't wait till y'all enable updating schemas on the fly 😅
Can't wait till y'all enable updating schemas on the fly 😅
Jason
Jason
08:49 PMThat’s correct.
Yup schema update is high in priority list!
Yup schema update is high in priority list!
Gabe
Gabe
08:52 PMoo just realized I can at least create the new collection via the console...sweet!
1
Jason
Jason
08:54 PMAnd you can copy paste the old schema from the “Schema” section and edit as needed!
Gabe
Gabe
08:54 PMyup yup!
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 3005 threads (79% resolved)
Similar Threads
On Aliasing Collections with Same Names
Aljosa suggested allowing an alias to have the same name as a collection. Jason explained the technical limitations for such a feature and future plans on alias functionality.
4
23mo
Solved
Updating Schemas and Managing Collections in Typesense
Davide asked about updating schemas without reloading data, Jason recommended using aliases to point to timestamped collections and dropping old collections after an update.
6
33mo
Solved
Updating Collection Schemas in Databases
Chris wanted to know about updating collection schemas. James and Jason provided insights and mentioned an upcoming solution for in-place schema changes.
3
28mo