AIDA / debug_qdrant.py
destinyebuka's picture
Deploy Lojiz Platform with Aida AI backend
79ef7e1
raw
history blame
1.16 kB
import asyncio
from qdrant_client import AsyncQdrantClient
QDRANT_URL = "https://b96fe9df-a305-449a-9d55-8e858bfa1b82.us-east-1-1.aws.cloud.qdrant.io:6333"
QDRANT_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3MiOiJtIn0.nftA6VmjSsSQHr3zkkt2wlqFgFY9uLM6gesqi6b6Cis"
async def debug():
client = AsyncQdrantClient(
url=QDRANT_URL,
api_key=QDRANT_API_KEY,
https=True,
timeout=60
)
print("πŸ” Fetching all points from Qdrant...\n")
# Scroll through all points
points, _ = await client.scroll(
collection_name="listings",
limit=100,
with_payload=True
)
print(f"Total points: {len(points)}\n")
for i, point in enumerate(points, 1):
payload = point.payload
print(f"Point {i}:")
print(f" Location: {payload.get('location')} (lower: {payload.get('location_lower')})")
print(f" Price: {payload.get('price')} (type: {type(payload.get('price')).__name__})")
print(f" Bedrooms: {payload.get('bedrooms')}")
print(f" Title: {payload.get('title', 'N/A')[:50]}")
print()
asyncio.run(debug())