Replies: 1 comment 6 replies
-
Hey @Haashimi! 👋 I'm here to help you with any bugs, questions, or contributions while we wait for a human maintainer. I'm a bot designed to assist with all things code-related. To query an existing Qdrant collection database in a Qdrant vector store, you can use the from qdrant_client import QdrantClient
from llama_index.legacy.vector_stores.qdrant import QdrantVectorStore
from llama_index.legacy.vector_stores.types import VectorStoreQuery, VectorStoreQueryMode
# Initialize the Qdrant client
client = QdrantClient(url="your_qdrant_url", api_key="your_api_key")
# Initialize the QdrantVectorStore
qdrant_store = QdrantVectorStore(
collection_name="your_collection_name",
client=client
)
# Create a query
query = VectorStoreQuery(
query_embedding=[0.1, 0.2, 0.3], # Example embedding
similarity_top_k=5, # Number of top similar nodes to retrieve
mode=VectorStoreQueryMode.DEFAULT # Query mode
)
# Perform the query
result = qdrant_store.query(query)
# Process the result
print(result) This code initializes the Qdrant client and the |
Beta Was this translation helpful? Give feedback.
-
how i can query exists qdrant collection db
Beta Was this translation helpful? Give feedback.
All reactions