masthishq / scripts /test_qdrant_method.py
Krishnakkp's picture
Initial commit
e785be9
Raw
History Blame Contribute Delete
682 Bytes
from qdrant_client import QdrantClient
try:
client = QdrantClient(path="qdrant_storage")
print("βœ… Client initialized.")
if client.get_collection("faces"):
print("βœ… Collection 'faces' exists.")
# Test query_points
try:
# Dummy vector 512 dim
dummy = [0.1] * 512
res = client.query_points(collection_name="faces", query=dummy, limit=1)
print(f"βœ… query_points success. Result type: {type(res)}")
print(f"Result: {res}")
except Exception as e:
print(f"❌ query_points failed: {e}")
except Exception as e:
print(f"❌ Error: {e}")