nasa / eo-metadata-tools

eo-metadata-tools is a set of repositories for working with Earth Observation metadata. At its core are common libraries and demonstration scripts for accessing the Common Metadata Repository, to be accompanied by more specific modules and scripts to do dataset-specific queries, metadata validation, etc...
Apache License 2.0
25 stars 11 forks source link

How do I search for EOSDIS datasets only (i.e., tag_key = gov.eosdis.nasa)? #23

Open clynnes opened 3 years ago

clynnes commented 3 years ago

Describe the bug I need to be able to search for EOSDIS data only.

To Reproduce Search through all the docs for tag_key, seems to be no way to search on that. Did I miss it?

Expected behavior Want to be able to search for datasets that have been tagged with a particular tag.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

jceaser commented 3 years ago

have you tried this:

import cmr.search.collection as coll
results = coll.search({'tag_key':'gov.nasa.eosdis'})
print("Found {} records.".format(len(results)))
for i in results:
    print (i['meta']['concept-id'])`

?