Skip to content

Filter CQL2 style needs to match HTTP method in search #803

Open
@jsignell

Description

@jsignell

While refreshing the CQL2 filtering tutorial (#802) I noticed that the HTTP method that you use in search affects whether you should use cql2-text or cql2-json. GET expects cql2-text and POST expects cql2-json. This leaks implementation details to the user and is hard to explain.

What if instead pystac-client coerced the filter value into the proper version before doing the request? There is something similar going on with sortby for instance.

It looks like pystac-client could use cql2-rs python bindings to make this happen with minimal effort. But it would also probably be straightforward to write a little function for mapping back and forth.

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