#community-help

Resolving Error Code 400 Issue with Updating Collection Schema

TLDR sahubar encountered an error when updating the scheme in production. Kishore Nallan suggested emailing Typesense and mentioned the ability to create a new updated collection, but sahubar insisted on using the existing collection.

Powered by Struct AI
Aug 18, 2023 (1 month ago)
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
11:31 AM
Hi Jason Kishore Nallan
Error: e: Request failed with HTTP code 400 | Server said: Field rating has been declared as a default sorting field, but is not found in the documents already present in the collection. If you still want to add this field, set it as optional: true.
It seems an error throws when I update the scheme in the collection
Note: This schema update working fine stage environment but the production environment throws above mentioned error response
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
11:45 AM
Please email [email protected] with the cluster ID and the collection you are trying this on.
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
12:13 PM
I have sent the email, need to deploy a live build so please do the needful earliest
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:21 PM
I'm in a couple of calls, and this requires us to investigate what's happening so won't be able to get to this until a bit later.
12:22
Kishore Nallan
12:22 PM
If you are blocked and need to deploy a build you can create a new collection with the updated schema and sync your data
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
12:38 PM
OK Kishore Nallan but we are using existing collection only not the new collection