-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
Hi,
I'm trying to count all items in collection using paging, but it seems, that paging is not working correctly. It seems it that Client.search().pages() yields ony the first page.
According to the pystac-client API reference for pystac_client.Client.search method
max_items – The maximum number of items to return from the search
limit – A recommendation to the service as to the number of items to return per page of results
I wrote code inspired by Usage/ItemSearch documentation. Following code results in 1 page and 100 items, but 2 pages and 200 items should be proceeded.
results = client.search(limit=100, max_items=200, collections=collection)
pages = 0
items = 0
for page in results.pages():
pages+=1
for item in page.items:
items+=1
print(pages, items)
Having limit=200 and max_items=100 does not work either.
Am I doing something wrong?
Thanks,
Jan
gadomski
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working