You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is an expected behaviour but I'd assume I could query for a specific date range or other metadata without specifying which product.
find_datasets will not work without specifying a product.
Actual behaviour
The actual behaviour is a ValueError saying "must specify a product".
Temporary workaround
Removing the if not query.product statement allows for returning results without the product name. The following change would also work in my case, even better so, since will will allow searching by product_family:
deffind_datasets_lazy(self, limit=None, ensure_location=False, dataset_predicate=None, **kwargs):
query=Query(self.index, **kwargs)
ifquery.productorquery.search['product_family']: # or query.product_family if it can be integrated into the Query class<dothesearch>else:
raiseValueError("must specify a product or product_family")
returndatasets
Environment information
Datacube version: 1.8.12
The text was updated successfully, but these errors were encountered:
Unfortunately the existing architecture of the index/database layer makes this more complicated than it appears on the surface. A major overhaul of the index/database layer is currently underway that will make use cases like this much easier to address. The fruits of this overhaul will appear in future 1.9.x and 2.0.x releases.
You can do cross-product searches using the lower level dc.index.datasets.search() method directly, but it is discouraged at the core API level because it is highly inefficient.
Expected behaviour
Not sure if this is an expected behaviour but I'd assume I could query for a specific date range or other metadata without specifying which product.
find_datasets
will not work without specifying aproduct
.Actual behaviour
The actual behaviour is a ValueError saying "must specify a product".
Temporary workaround
Removing the
if not query.product
statement allows for returning results without the product name. The following change would also work in my case, even better so, since will will allow searching by product_family:Environment information
Datacube version: 1.8.12
The text was updated successfully, but these errors were encountered: