diff --git a/adsmp/solr_updater.py b/adsmp/solr_updater.py index d8c103a..eb3a988 100644 --- a/adsmp/solr_updater.py +++ b/adsmp/solr_updater.py @@ -179,7 +179,7 @@ def extract_classifications_pipeline(db_classifications, solrdoc): """retrieve expected classifier collections classifications is a solr virtual field so it should never be set""" - db_classifications = [element for element in (db_classifications or []) if element] # remove empty strings + db_classifications = [element for element in (db_classifications or []) if element in config.get("EXPOSE_COLLECTIONS")] # remove empty strings if db_classifications is None or len(db_classifications) == 0: return {"database" : solrdoc.get("database", None)} diff --git a/config.py b/config.py index b4934cb..dcb4066 100644 --- a/config.py +++ b/config.py @@ -150,4 +150,10 @@ "title", "doctype", "pub_raw" -] \ No newline at end of file +] + +EXPOSE_COLLECTIONS = [ + "astrophysics", + "heliophysics", + "planetary" + ]