Skip to content

collection filtering on nested properties does not work #385

@botanical

Description

@botanical

I know that @bitner is already aware of this but I wanted to write an issue formally for tracking purposes.

When trying to filter on a nested property tenant, I am unable to retrieve the expected collection. For example, given two collections with "tenant" fields set on properties,

           id            |                        title                         |      tenant      |           properties           
-------------------------+------------------------------------------------------+------------------+--------------------------------
 noaa-emergency-response | NOAA Emergency Response Imagery                      | test-tenant      | {"tenant": "test-tenant"}
 barc-thomasfire         | Burn Area Reflectance Classification for Thomas Fire | test-fire-tenant | {"tenant": "test-fire-tenant"}

I would expect collection_search to return my collection but it does not find a match:

postgis=# select * from collection_search('{"filter":{"op":"=","args":[{"property":"tenant"},"test-fire-tenant"]}}');
                             collection_search                             
---------------------------------------------------------------------------
 {"links": [], "collections": [], "numberMatched": 0, "numberReturned": 0}
(1 row)

postgis=# select * from collection_search('{"filter":{"op":"=","args":[{"property":"tenant"},"test-tenant"]}}');
                             collection_search                             
---------------------------------------------------------------------------
 {"links": [], "collections": [], "numberMatched": 0, "numberReturned": 0}
(1 row)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions