Find answers from the community

Updated 3 months ago

Query

Hey! Anyone faced problems with Weaviate vectorstore? I try to query the database, but it always returns an empty response. Created the embeddings from llamaindex and query it with the same parameters. Uploading embeddings worked, but querying not.
L
D
6 comments
How are you querying it? With llamaindex? Raw weaviate?
With llama index
Is there any difference between the index construction and querying code? Might help to share some samples
No. The same approach works perfectly with elasticsearch. Here is the code:
import weaviate

auth_config = weaviate.AuthApiKey(api_key="XYZ")

client = weaviate.Client(
url="XYZ",
auth_client_secret=auth_config
)
from llama_index.vector_stores import WeaviateVectorStore
vector_store = WeaviateVectorStore(weaviate_client=client)
index = VectorStoreIndex.from_vector_store(vector_store) (tried it with including storage_context and service_context, but none of them made it work)
Then I queried this index.
Oh I've encountered this before. I think you need to provide index_name=... to the WeaviateVectorStore
I tried this one, I checked with vector_store.index (or similar) the name of the index (as it was autogenerated), I got back the index name and used it in WeaviateVectorStore. I rather go on with elasticsearch😄
Add a reply
Sign up and join the conversation on Discord