How to add a property to existing class definition with default value?

The documentation on how to update an existing class to add a new property is clear in Weaviate documentation: REST - /v1/schema | Weaviate - vector database

However, what if I wanted to add a property with a default value and make this skipped for vectorization. We will just use this property for extra filtering purposes. For example, I wanted to add a new property “status” with default value of “PUBLIC” - is this possible?


Short answer is no :frowning: Or better, not yet :upside_down_face:

While you can use the skip parameter to avoid vectorization, there is no option to add a default value for this new property as of now.

Please, feel free to open a Github issue regarding this and/or join us at our slack so we can discuss it further.

Thank you! :slight_smile:

As a workaround can I add property to the schema (with skip vectorisation) and then update all records of the class with the default value or is there any better solution?

Hi @kokogrr I believe that’s the best solution. In order to read all objects, you can leverage the Cursor API