esgf2-us / metagrid

ESGF Search UI
https://metagrid.readthedocs.io/en/latest/
MIT License
16 stars 6 forks source link

Add support for peer and child projects #208

Open tomvothecoder opened 3 years ago

tomvothecoder commented 3 years ago

Describe the solution you'd like A clear and concise description of what you want to happen.

CoG supports peer and child projects. image

Specifically for CMIP5, the query for results includes additional sub-projects in the query (TAMPI, EUCLIPSE, LUCID, GeoMIP, and PIMP3).

https://esgf-node.llnl.gov/esg-search/search/?offset=0&limit=10&type=Dataset&replica=false&latest=true&project=CMIP5&project=TAMIP&project=EUCLIPSE&project=LUCID&project=GeoMIP&project=PMIP3&facets=project%2Cproduct%2Cinstitute%2Cmodel%2Cexperiment%2Cexperiment_family%2Ctime_frequency%2Crealm%2Ccmor_table%2Censemble%2Cvariable%2Cvariable_long_name%2Ccf_standard_name%2Cdata_node&format=application%2Fsolr%2Bjson

   "fq": [
        "type:Dataset",
        "replica:false",
        "latest:true",
        "project:\"CMIP5\" || project:\"TAMIP\" || project:\"EUCLIPSE\" || project:\"LUCID\" || project:\"GeoMIP\" || project:\"PMIP3\""
      ],

Describe the solution you'd like A clear and concise description of what you want to happen.

  1. Add support for peer and child projects, which includes new Django models and fields (M2M and/or FK).
  2. Asub_project field that is an array of strings which is only used in the query (e.g. CMIP5)
sashakames commented 3 years ago

Good find. treating these as child projects to be added to the search seems like a good resolution...

sashakames commented 1 year ago

Having missed this issue, I think it is still relevant and will put it on the board @downiec

sashakames commented 1 year ago

In some ways, Tom's suggestion is a stopgap, adding to the DB when really this should be corrected in the index metadata. Right now the issue is the related projects don't appear and should for CMIP5. One way or another we need that before declaring production-ready.

sashakames commented 10 months ago

Simple fix to add projects to the search query for CMIP5