pgstac icon indicating copy to clipboard operation
pgstac copied to clipboard

Search with only Item ID can return invalid item

Open lossyrob opened this issue 2 years ago • 0 comments

I am seeing behavior where if a search is performed with only "items" specified, but no "collections", that invalid results can occur. I saw this through stac-fastapi, where the get_item() call was only supplying an item_id to the PgstacSearch. This is incorrect and I'll be fixing in a PR there, but what I was seeing was that an item - that did not have a matching Item ID - was being returned, and that item belonged to another collection. A search on an Item ID without a collection ID should return all (potentially multiple) matching Items from across collections. I have not reproduces this error in the project, and it may be hard to reproduce - this seems to have been working fine, but after a redeploy - I'm not sure if some state changed in the DB - I started consistently getting incorrect results from Item queries.

lossyrob avatar Sep 23 '21 03:09 lossyrob