Find answers from the community

Updated 10 months ago

What's the best way to persist a Qdrant

At a glance

The community member is asking about the best way to persist a Qdrant vector store index and load it from a persist directory, as the support for persisting is unclear to them. The comments suggest that the vector store object can be set up again to point to the existing vector store, and the VectorStoreIndex.from_vector_store() method can be used to create the index. Another community member clarifies that the index can be loaded from a directory by creating a QdrantClient instance with the path to the existing Qdrant database, and then creating the QdrantVectorStore and VectorStoreIndex instances.

What's the best way to persist a Qdrant vector store index and also load from the persist directory? The support for persisting is unclear to me for Qdrant.
L
a
3 comments
It persists itself really

You just need to setup the vector_store object again to point to the existing vector store, and do

index = VectorStoreIndex.from_vector_store(vector_store, ...)
I have the index in a directory - so i can't just call the vector store
But you can πŸ™‚

Plain Text
import qdrant_client

client = qdrant_client.QdrantClient(path="path/to/existing_qdrant_db")

vector_store = QdrantVectorStore(client=client, collection_name="paul_graham")

index = VectorStoreIndex.from_vector_store(vector_store, ...)
Add a reply
Sign up and join the conversation on Discord