The initializer way works mostly, but ‘text_key’ needs to be added:
db = WeaviateVectorStore(embedding=embedding_model, client=weaviate_client, index_name='test3', text_key='text')
Another questions: what does ‘text_key’ exactly mean? I understand it should be the textual field that you want to index, for example:
{
'title': "a test",
"content": 'This is a paragraph'.
}
In this case, I would set text_key=“content”. However, you look at this example, it sets text_key = ‘text’, but the document doesn’t have ‘text’ field at all. It only have ‘page_content’, so I am confused!
https://python.langchain.com/v0.2/docs/integrations/retrievers/weaviate-hybrid/