Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase limits for collections endpoints. #173

Closed
sharkinsspatial opened this issue Mar 22, 2019 · 6 comments
Closed

Increase limits for collections endpoints. #173

sharkinsspatial opened this issue Mar 22, 2019 · 6 comments
Milestone

Comments

@sharkinsspatial
Copy link
Contributor

No description provided.

@matthewhanson
Copy link
Member

I do not recall what the actual problem was here. I think there was some hard-coded limit that was used when querying on collections, but I can't find where that is.

@matthewhanson matthewhanson added this to the 0.2.4 milestone May 3, 2019
@matthewhanson
Copy link
Member

As I'm not sure what problem this causes, or what use case is affected by it, I'm moving it to 0.3.0 so we can get some more information first.

@matthewhanson matthewhanson modified the milestones: 0.2.4, 0.3.0 Jun 3, 2019
@geospatial-jeff
Copy link

geospatial-jeff commented Aug 20, 2019

@matthewhanson This causes a problem when ingesting items in catalogs which contain more than 10 collections. The elasticsearch.Client.search method takes an optional argument size which defaults to 10. When removing hierarchical links from items, sat-api checks the ID of the item's respective collection (stac_item.properties.collection) against the array of collections returned from searching the collections index.

Because this array is by default limited to 10 items, sat-api may think an item is not included in a collection when it actually is. The item is still ingested successfully but any properties included at the collection level as commons are not transferred to the item (see here). The logs show the following error when this happens:

error: 1102311 has no collection

While investigating this I found a related bug - #192

@matthewhanson
Copy link
Member

nice find @geospatial-jeff , thanks for tracking it down.

So we either need to start paginating on the collections endpoint, or make the default something suitably large enough that it won't be an issue in most cases. Clearly, increasing the default isn't the best long term approach, but I'm tempted to do that for 0.3.0 (STAC 0.7.0) as there's some work to be done on paging in the upcoming version STAC version 0.8.0

@geospatial-jeff
Copy link

@matthewhanson I think an environment variable with default value of 10 is a good short term solution since the user should know how many collections are within the catalog.

@matthewhanson
Copy link
Member

Sounds like a good plan @geospatial-jeff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants