You can drop a field and then update it to be a ob...
# community-help
f
You can drop a field and then update it to be a object, and then define a nested field as so original payload (schema definition):
Copy code
{
  "name": "parent",
  "fields": [
    {
      "name": "num",
      "type": "int32"
    }
  ],
  "default_sorting_field": "num",
  "enable_nested_fields": true
}
and then the PATCH payload
Copy code
{
  "fields": [
    {
      "name": "num",
      "drop": true
    },
    {
      "name": "num",
      "type": "object"
    },
    {
      "name": "num.name",
      "type": "string"
    }
  ]
}
When you then try to create a document like:
Copy code
{
  "num": {
    "name": "name"
  }
}
Keep in mind, this schema update will be a breaking change, and you'd have to manage the porting of documents