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

Is the "contains" operator for queries not supported? #807

Closed
NicholasPini opened this issue Mar 11, 2025 · 1 comment
Closed

Is the "contains" operator for queries not supported? #807

NicholasPini opened this issue Mar 11, 2025 · 1 comment

Comments

@NicholasPini
Copy link

NicholasPini commented Mar 11, 2025

In the stac-fastapi-pgstac GitHub repo I've found this comment in https://github.com/stac-utils/stac-fastapi-pgstac/blob/0357f130bfa202038b90bc9ffac5d0b9495cc564/stac_fastapi/pgstac/extensions/query.py#L22-L26 of the 5.0.0 version:

# TODO: These are defined in the spec but aren't currently implemented by the api
# startsWith = auto()
# endsWith = auto()
# contains = auto()
# in = auto()

Does this mean that stac-fastapi does not support these operators in queries? Is there any plan of supporting them, if this is the case? And if this is not the case, how can I use these features? Thank you.

@vincentsarago
Copy link
Member

Hi @NicholasPini, this the pgstac backend doesn't not implement it!

the stac-fastapi repo holds the CORE api code, but then it's up to each backend (pgstac / elastic search /...) to implement the search features. In stac-fastapi https://github.com/stac-utils/stac-fastapi/blob/main/stac_fastapi/extensions/stac_fastapi/extensions/core/query/request.py#L13-L37 we simply says that if the Query extension is enabled then the user should be able to pass a query= parameter (or body entry). Each backend can then define more precisely how they implement it.

it seems that the elastic search backend doesn't support the contains key as well https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/blob/main/stac_fastapi/core/stac_fastapi/core/extensions/query.py#L33-L38

If you have more question about pgstac, please either report to the https://github.com/stac-utils/stac-fastapi-pgstac or https://github.com/stac-utils/pgstac repos

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

2 participants