Hi @chris31522,
Thank you so much for sharing this information — it’s really helpful! I’ve taken a look, and I can see that the issue is to the fact that a vectorizer hasn’t been specified in your schema ‘vectorizer’.
Here’s an example of how you can add a vectorizer - in the deprecated client:
class_obj = {
“class”: “Article”,
“properties”: [
{
“name”: “title”,
“dataType”: [“text”],
},
],
“vectorizer”: “text2vec-openai” # This can be any vectorizer of your choice
client.schema.create_class(class_obj)
}
Additionally, you’re using an old version of the client / deprecated, which is making things a bit more complicated for you. I highly recommend upgrading to Python Client v4. This version offers friendly syntax and better performance, making it much easier to work with.
Here is how easy you can specify vectorizer in V4:
Here’s what I recommend for your use case:
-
Remove the current schema.
-
Upgrade your Weaviate Client locally by running the following: pip install -U weaviate-client
-
Recreate the schema using the updated syntax (including the vectorizer) - see below:
from weaviate.classes.config import Configure, Property, DataType
client.collections.create(
“Article”,
vectorizer_config=Configure.Vectorizer.text2vec_openai(),
properties=[ # This part is optional, depending on your needs
Property(name=“title”, data_type=DataType.TEXT),
Property(name=“body”, data_type=DataType.TEXT),
]
)
As you can see, the new syntax is much more user-friendly and easier compared to the old version!
- Ingest data using the batch method in v4 — you’ll find it much faster and easier.
One of the main benefits of using the v4 client is that uses a gRPC interface. It is based on HTTP/2 and Protocol Buffers, and is therefore very fast and efficient.
I hope this helps! If you have any questions or need further assistance, don’t hesitate to reach out — I’m here to help.
Best regards,
Mohamed Shahin
Weaviate Support Engineer