Skip to content

Search by datetime in CQL Text #108

@m-mohr

Description

@m-mohr

Describe the bug
As datetime is not supported directly, as seen in #100, I'm now trying to use CQL which was mentioned as alternative.

I want to filter by timestamp on the datetime field, e.g.
https://planetarycomputer.microsoft.com/api/stac/v1/collections/chloris-biomass/items?limit=12&filter-lang=cql2-text&filter=datetime < TIMESTAMP('2010-01-01T01%3A00%3A00.000Z') (also tried the URL encoded variant)

Instead of results that are older than 2010, I also get results that are newer than 2010. It looks like the filter is not taken into account at all.

Is CQL not supported on the items endpoint? Some of the conformance classes around filtering are a bit of a mess in stac-fastapi and stac-api-spec currently, so I'm just guessing...

To reproduce
See above.

Expected behavior
See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions