Find answers from the community

Updated 4 months ago

I try to insert documents in a qdrant collection. The collection doesn't exist yet in my q

At a glance

The community member is trying to insert documents into a Qdrant collection, but the collection doesn't exist yet in their Qdrant cluster. They use the QdrantVectorStore to create the collection, but when they query the Qdrant client, the collection doesn't appear to exist.

In the comments, another community member suggests that the collection might not show up until data is actually added to it. They are unsure, but mention that it has always worked fine for them. Another community member provides more context, stating that the QdrantVectorStore is typically initialized with a Qdrant client and a collection name, and that the collection may need to be created manually if it doesn't exist after running the code. However, the documentation doesn't explicitly state whether the QdrantVectorStore creates the collection if it doesn't exist.

There is no explicitly marked answer in the comments, and the community members recommend checking the Qdrant documentation or the qdrant-client package documentation for more details on how collections are handled.



I try to insert documents in a qdrant collection. The collection doesn't exist yet in my qdrant cluster.
I use this code :

service_context = ServiceContext.from_defaults(llm=llm, embed_model=embedding_model)
vector_store = QdrantVectorStore(client=client, collection_name="RAG_llama_index_small_to_big")

But when I query my qdrant client it appears that the collection "RAG_llama_index_small_to_big" doesn't exist.
Should I create it before trying to insert, or does QdrantVectorStore create it if it doesn't exist yet ?
k
L
3 comments
Please stand by @tatanfort as I search the knowledge base. I normally take about 20 seconds or so. :wave:
----------------------
Based on the information provided in the extracts, it's not explicitly stated whether the QdrantVectorStore creates a new collection if it doesn't exist. However, in typical usage, the QdrantVectorStore is initialized with a QdrantClient and a collection_name.

Here is an example of how it's done:

Plain Text
client = qdrant_client.QdrantClient(
    location=":memory:"
)
vector_store = QdrantVectorStore(client=client, collection_name="paul_graham")

(Source: QdrantIndexDemo ())

If the collection doesn't exist after running your code, it's possible that you might need to create the collection manually before inserting documents. However, without explicit information from the documentation or the code extracts, it's hard to say for certain.

I would recommend checking the Qdrant documentation or the qdrant-client package documentation for more details on how collections are handled.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
It might not show up until you actualla add data? Unsure, but it's always worked fine for me
Add a reply
Sign up and join the conversation on Discord