but if the version which is being retracted has latest=true and earlier non-retracted versions exist, then it might be helpful also to restore the latest=true on the latest non-retracted version -- so that it will be found when searching without "show all versions" -- rather than leave it without any versions of the dataset having latest=true.
I see there is code to set
latest=false
when retracting a dataset version:https://github.com/ESGF/esg-search/blob/f3dbb548c45afba5ffa84a9352c3d452f5f4f650/src/java/main/esg/search/publish/impl/solr/SolrRetractor.java#L82
but if the version which is being retracted has
latest=true
and earlier non-retracted versions exist, then it might be helpful also to restore thelatest=true
on the latest non-retracted version -- so that it will be found when searching without "show all versions" -- rather than leave it without any versions of the dataset havinglatest=true
.If this is done, then it would also be necessary to ensure that when publishing a new later version, it would set
latest=false
on whichever earlier version haslatest=true
, not necessarily the latest existing version (which might have been retracted). I'm not sure if the existing code would need to be modified to achieve this, but see the lines following this comment: https://github.com/ESGF/esg-search/blob/f3dbb548c45afba5ffa84a9352c3d452f5f4f650/src/java/main/esg/search/publish/thredds/ThreddsCrawler.java#L224-L225For example: