Spaces:
Running
Running
File size: 1,156 Bytes
79ef7e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
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()) |