Description
When creating a new collection with an existing collection’s config, the newly created collection does not retain the original collection’s properties
Server Setup Information
- Weaviate Server Version: weaviate:1.24.22
When creating a new collection with an existing collection’s config, the newly created collection does not retain the original collection’s properties
hi @Bigdwarf43 !!
Thank you very much. Nice catch!
This is a reproducible bug
here is how I have reproduced it:
client.collections.delete(["Test", "NewTest"])
collection = client.collections.create("Test",
properties=[
wvc.config.Property(
name="field_tokenizer",
data_type=wvc.config.DataType.TEXT,
tokenization=wvc.config.Tokenization.FIELD
)
]
)
# extract the collection config dict
schema_dict = collection.config.get().to_dict()
defined_tokenizer = schema_dict.get("properties")[0].get("tokenizer")
assert defined_tokenizer == "field"
# create a new collection
modified_schema_dict = schema_dict
modified_schema_dict["class"] = "NewTest"
new_collection = client.collections.create_from_dict(modified_schema_dict)
new_tokenizer = new_collection.config.get().properties[0].tokenization.value
assert defined_tokenizer == new_tokenizer
I will escalate this ASAP.
Thanks!
hi @Bigdwarf43 !!
We have a PR already!
We should see a new version of the client with this issue fixed soon.
Thanks!