You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WeaviateDocumentIndex fails if index name is not capitalized
fromdocarrayimportBaseDoc, DocListfromdocarray.indeximportWeaviateDocumentIndexfromdocarray.typingimportNdArrayfrompydanticimportFieldimportnumpyasnp# Define the document schema.classMyDoc(BaseDoc):
title: strembedding: NdArray[128] =Field(is_embedding=True)
# Create dummy documents.docs=DocList[MyDoc](MyDoc(title=f'title #{i}', embedding=np.random.rand(128)) foriinrange(10))
# Initialize a new WeaviateDocumentIndex instance and add the documents to the index.doc_index=WeaviateDocumentIndex[MyDoc](index_name='zdzd')
doc_index.index(docs)
# Perform a vector search.query=np.ones(128)
retrieved_docs=doc_index.find(query, limit=10)
File "/Users/jinaai/Desktop/docarray/docarray/index/backends/weaviate.py", line 354, in find
docs, scores = self._find(
File "/Users/jinaai/Desktop/docarray/docarray/index/backends/weaviate.py", line 408, in _find
results["data"]["Get"][index_name], score_name
KeyError: 'zdzd'
The text was updated successfully, but these errors were encountered:
WeaviateDocumentIndex fails if index name is not capitalized
The text was updated successfully, but these errors were encountered: