#community-help

Updating Sort Field and Preserving Documents

TLDR Vaibhav asks if they need to drop the "name" field to update sort. Jason confirms and explains that documents will remain preserved, but schema alterations will block operations.

Powered by Struct AI
Feb 05, 2023 (10 months ago)
Vaibhav
Photo of md5-0117159aeed7d167f44293e99d32bb26
Vaibhav
08:20 PM
In order to update sort to true, do I have to drop the original “name” field and then add a new “name”? What will happen to all my documents?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:21 PM
> In order to update sort to true, do I have to drop the original “name” field and then add a new “name”?
That’s correct.

> What will happen to all my documents?
Your documents will be preserved as is.
08:22
Jason
08:22 PM
Heads-up though that altering the schema in-place blocks all operations on that collection until it is complete
Vaibhav
Photo of md5-0117159aeed7d167f44293e99d32bb26
Vaibhav
09:40 PM
Got it, thank you!