Find answers from the community

Updated 2 months ago

hi this is another beginner question is

hi this is another beginner question is there anyway to call upon an existing collection rather then recreating and reindexing it
L
a
s
31 comments
When doing from_vector_strore, you don't need to pass in the storage context again or set it up, just pass in the vector store and service context
index = VectorStoreIndex.from_vector_store(
vector_store=vector_store,
service_context=service_context,
)" ----------- like this?
Hi @Logan M , I have been trying to load from vector, using the same method, and it doesn't seem to work
client = weaviate.Client("http://localhost:8080")
self.vector_store = WeaviateVectorStore(weaviate_client=client, class_name='LlamaIndex_solution')
self._index = VectorStoreIndex.from_vector_store(vector_store=self.vector_store)
that index doesn't find anything when i try to search
i'm able to use a weaviatereader to read the documents from the same class in weaviate
and build the index using from_documents
of course that defeats the purpose of using a vector store
I can spin up weaviate and test, but that looks correct at first glance
been pulling my hair out trying to figure out what i'm doing wrong
yeah would very much appreciate it
the data is definitely in weaviate in my instance
it seems like it's trying to create a new index
weaviate gets a new class each time
{"action":"hnsw_vector_cache_prefill","count":1000,"index_id":"llamaindex_4cbf2e5574dc4e6689902c06216916d5_2XomdgHy9FiZ","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2023-07-21T22:31:52Z","took":124200}
ive 100% loaded an index from weaviate before, just need to refresh myself with how it works again
i must be missing smething obvious
but can't find it even tracing through code
at least so far
hmm tbh it worked for me lol

One misleading thing is it says class_prefix is deprecated, please use class_name but actually, you should use index_name lol
Attachment
image.png
Here's all my code

Plain Text
client = weaviate.Client("https://llama-test-8dkemtip.weaviate.network", auth_client_secret=resource_owner_config)
loaded_vector_store = WeaviateVectorStore(weaviate_client=client, class_prefix="LlamaIndex_solution")
loaded_index = VectorStoreIndex.from_vector_store(loaded_vector_store)
query_engine = index.as_query_engine()
response = query_engine.query("What happened at interleaf?")
print(response)
that's what got me
i'll do a pr for the doc
thank you so mich
nice, that would be awesome thanks!
Add a reply
Sign up and join the conversation on Discord