opened 07:34PM - 12 Aug 24 UTC
When exporting the collection config using `to_dict`, the `tokenization` paramet…er is defined as `tokenizer`.
This causes a wrong parameter name to be generated, and when using `creating_from_dict` with this dict, it doesn't have a tokenization, and fall backs to default (word) when used with `create_from_dict`.
this affects 4.7.1. [Here is the line to change](https://github.com/weaviate/weaviate-python-client/blob/5482164c2732db8ea9ce66b1c4743a4c2140b8ac/weaviate/collections/classes/config.py#L1223)
Code to test:
```python
import weaviate
from weaviate import classes as wvc
client = weaviate.connect_to_local()
print(weaviate.__version__, client.get_meta().get("version"))
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
# change it to a new name
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
print("new tokenizer", new_tokenizer)
assert new_tokenizer == "field"
```