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
{{ message }}
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
bug: WeaviateDocumentIndex fails if index name is not capitalized #1709
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'
Activity