Find answers from the community

Updated 3 months ago

Hello,

Hello,
How can I load my qdrant index once it has been created, is there a load_index_from_storage kind of function ?
W
T
5 comments
You will have to pass the collection name I think.

Plain Text
vector_store = QdrantVectorStore(client=client, collection_name="paul_graham")
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
    documents,
    storage_context=storage_context,
)


If you pass the same collection name where embeddings were ingested in the first place , it will only be used
I might be wrong, but when I do this with the same initial documents, it’s duplicating the vectors stored in the db
You are passing the documents everytime.
Try doing this:
Plain Text
# option A
index = VectorStoreIndex.from_documents(
    [],
    storage_context=storage_context,
)

# Option B
index = VectorStoreIndex(
    storage_context=storage_context,
)
Thanks, I feel a bit stupid now 🫣
No worries, glad it is solved
Add a reply
Sign up and join the conversation on Discord