Guide on Updating Collections in Application Development
TLDR Ajeet requested guidance on updating collections for an application, citing issues like lack of schema validation. Jason suggested using regex for field restriction and confirmed collection alias functionality. CaptainCodeman shared a plan to use version numbers for collections avoiding delays.
Jan 31, 2022 (20 months ago)
Ajeet
02:20 PMHi there - We are building an application where we need to update the collection later on based on requirement, so can you please guide me how does collection updating works.
1. I have tried auto schema, it does add dynamic field but it will add any fields in collection, there is no schema validation over there and also I can not filter the data with auto schema collection.
1. I need to understand how we can update collection through alias if we have existing record in collection.
https://typesense.org/docs/0.22.1/api/collections.html#update-a-collection
Jason
02:41 PMCollection alias will work regardless of the number of documents in the collection. It’s just like a symlink
CaptainCodeman
03:36 PMTypesense
Indexed 2764 threads (79% resolved)
Similar Threads
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.

Updating Collections Strategy and Faceting New Field
Nithin asked about strategies for updating collections and faceting new fields. Kishore Nallan suggested creating another collection, indexing in the background and using aliases to switch live traffic over, and shared details about the upcoming release.
Infix Searching and Schema Updates in Typesense
Loic queried the inability to perform infix searches and update schemas in Typesense. Jason explained that default is prefix search, provided solutions for infix searching, and mentioned that a forthcoming version supports field definition updates. An upgrade was queued from backend.
