Skip to content

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

Closed
@StijnCaerts

Description

@StijnCaerts

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions