-
Notifications
You must be signed in to change notification settings - Fork 18
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
Simple search returns items onlly with properties.datetime field #217
Comments
By default, the FieldsExtension spec in the stac-fastapi parent library only includes one property, datetime . |
To get all your properties do this: |
Yes indeed. What you wrote is true. Nevertheless is this the correct
behavior according to stac api specs ?
A simple search will always return only one property?
In https://api.stacspec.org/v1.0.0/item-search/ the response contains all
the propery fields
…On Fri, Mar 22, 2024, 8:01 PM Jonathan Healy ***@***.***> wrote:
To get all your properties do this:
http://localhost:8080/search?fields+properties&limit=10
—
Reply to this email directly, view it on GitHub
<#217 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4JT4R6O2KGBU6ADMBWAWTYZRWWJAVCNFSM6AAAAABFDQ7J3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVGYZTKNBQGI>
.
You are receiving this because you authored the thread.Message ID:
<stac-utils/stac-fastapi-elasticsearch-opensearch/issues/217/2015635402@
github.com>
|
I am guessing they only include one property because there are many very large stac datasets out there online and returning the minimum amount of information makes a lot of sense. Especially if you're only displaying items on a map I guess. I would make this an issue in the stac-fastapi parent repo. With a small limit and if you're using pagination, it doesn't really offer any performance benefits to hide most of the properties. |
They should be following the stac api spec though ideally. |
Ideally yes. I would add another use case where all the properties are
needed. In my case I have more than 20 fields and the only option I have is
to pass the 20+ arguments us8ng the field extension. It makes more sense to
return everything and filter only if needed
…On Sat, Mar 23, 2024, 5:14 PM Jonathan Healy ***@***.***> wrote:
They should be following the stac api spec though ideally.
—
Reply to this email directly, view it on GitHub
<#217 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4JT4VYVMZRLDJAUEDD4OTYZWL57AVCNFSM6AAAAABFDQ7J3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGUZDCNRSGU>
.
You are receiving this because you authored the thread.Message ID:
<stac-utils/stac-fastapi-elasticsearch-opensearch/issues/217/2016521625@
github.com>
|
You can just do +properties to show all the properties like this |
It would be interesting to see what people think over there |
I think it would be best to follow the STAC API specs https://api.stacspec.org/v1.0.0/item-search/ There are also implementations like STAC Browser that use the search endpoint in order to return items. As a user I would expect to see all the properties of an Item. |
Would you mind adding the issue here? This is where the relevant issue comes from. https://github.com/stac-utils/stac-fastapi/issues |
🤔 it's interesting, there is a different behaviour between
and will in fact does not rely on POST
GET
|
I think I'm going to propose that we deprecate the
|
**Related Issue(s):** - #217 - stac-utils/stac-fastapi#642 - stac-utils/stac-fastapi@d8528ae **Description:** - Update to stac-fastapi v3.0.0a3 - Remove deprecated filter_fields - Default to returning all properties, copy stac-fastapi-pgstac behaviour for now **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [x] Tests pass (run `make test`) - [x] Documentation has been updated to reflect changes, if applicable - [x] Changes are added to the changelog
As discussed here, this is resolved now. |
Simple search
http://localhost:8000/search?limit=10
returns items onlly with properties.datetime fieldIn particular in line
https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/blob/987f0b924b45e3f63302758b6e63d38ba504964f/stac_fastapi/core/stac_fastapi/core/core.py#L593C12-L593C64
filter_kwargs = search_request.fields.filter_fields
filter_fields is equal to
As a response i get the FeatureCollection
Shouldnt the filter_kwargs` be equal to
FYI.
The item has the following properties
The text was updated successfully, but these errors were encountered: