Skip to content

Filters using CMIP6 properties appear to have no effect #9

@nocollier

Description

@nocollier

Apologies @rhysrevans3 if this issue is misplaced.

I am trying to learn how to do more complex searches with the STAC API and this extension through the API you all have at CEDA. I can do a simple query:

client = pystac_client.Client.open("https://api.stac.ceda.ac.uk")
results = client.search(
    collections="cmip6",
    max_items=None,
    limit=100,
    query=[
        "cmip6:variable_id=rsus",
        "cmip6:experiment_id=historical",
    ],
) # This works!

But I could not figure out how to use query to do more complex searches. Say I wanted all records where the variable was rsus OR rsds. I read on the STAC extensions documentation for query that filter was preferred--more feature rich and used a standard language. However I find this does not work:

results = client.search(
    collections="cmip6",
    max_items=10,
    filter={"op": "=", "args": [{"property": "cmip6:variable_id"}, "rsus"]},
) # Returns 0 matched items

I suspect that it has something to do with the CMIP6 extension, but I am not sure. I am fairly certain it is not user error. Any thoughts?

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