Open maxnoe opened 4 months ago
Imagine custom metadata (e.g. using the JSON backend) like this:
did_client.set_metadata_bulk(scope, name1, meta={"categories": ["foo", "bar"], "format": "fits"}) did_client.set_metadata_bulk(scope, name2, meta={"categories": ["bar", "baz"], "format": "ecsv"})
We'd like to support filters with operations in and contains, i.e. for the list metadata item, querying for contains:
in
contains
did_client.list_dids(scope, filters={"categories.contains", "bar"})
or "in" for the format:
format
did_client.list_dids(scope, filters={"format.in", ["fits", "ecsv"]})
The first (contains) is impossible currently I think. The second form is "only" a more concise version of listing multiple dictionaries:
did_client.list_dids(scope, filters=[{"format", "fits"}, {"format": "ecsv"}])
but this format gets unwieldy pretty fast if combined with other conditions.
Enabling more complex queries on metadata.
Support for the new operators added to metadata plugins.
Hi @maxnoe this is definitely something we want to do. @Geogouz just started to work on the metadata this month.
Description
Imagine custom metadata (e.g. using the JSON backend) like this:
We'd like to support filters with operations
in
andcontains
, i.e. for the list metadata item, querying forcontains
:or "in" for the
format
:The first (contains) is impossible currently I think. The second form is "only" a more concise version of listing multiple dictionaries:
but this format gets unwieldy pretty fast if combined with other conditions.
Motivation
Enabling more complex queries on metadata.
Change
Support for the new operators added to metadata plugins.