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

GET /search filter-lang doesn't default to cql2-text #179

Closed
StijnCaerts opened this issue Dec 19, 2023 · 0 comments
Closed

GET /search filter-lang doesn't default to cql2-text #179

StijnCaerts opened this issue Dec 19, 2023 · 0 comments

Comments

@StijnCaerts
Copy link
Collaborator

Describe the bug
The GET /search filter-lang parameter doesn't default to cql2-text, like it is defined in the specification of the filter extension. Instead, cql2-json is used as the default when no value is supplied.
https://github.com/stac-api-extensions/filter?tab=readme-ov-file#get-query-parameters-and-post-json-fields

https://github.com/stac-utils/stac-fastapi-elasticsearch/blob/main/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/core.py#L383-L388

To Reproduce
Steps to reproduce the behavior:

  1. Perform a GET /search request with the filter parameter (eg. filter=cloud_cover < 10).
  2. The filter cannot be parsed and an error is returned.

Expected behavior
The default filter-lang in a GET search is cql2-text and queries can be parsed successfully.

StijnCaerts added a commit to StijnCaerts/stac-fastapi-elasticsearch that referenced this issue Dec 20, 2023
jonhealy1 added a commit to StijnCaerts/stac-fastapi-elasticsearch that referenced this issue Jan 5, 2024
jonhealy1 added a commit that referenced this issue Jan 5, 2024
Set correct default filter-lang for GET /search requests
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