from actian_vectorai import VectorAIClient
COLLECTION = "products"
# Connect to VectorAI DB server
with VectorAIClient("localhost:50051") as client:
all_points = []
offset = None # Start from beginning
page_num = 1
while True:
# Get next page of results
results, next_offset = client.points.scroll(
COLLECTION, # Collection name
limit=3, # Points per page
offset=offset, # Current position
with_vectors=False, # Exclude vectors
with_payload=True # Include payloads
)
# Break if no results
if not results:
break
# Display page results
print(f"\nPage {page_num} ({len(results)} points):")
for point in results:
print(f" ID {point.id}: {point.payload}")
all_points.append(point)
# Check for more pages
if next_offset is None:
break
# Move to next page
offset = next_offset
page_num += 1
print(f"\nTotal points retrieved: {len(all_points)}")