Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adsmp/solr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}

Expand Down
8 changes: 7 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,10 @@
"title",
"doctype",
"pub_raw"
]
]

EXPOSE_COLLECTIONS = [
"astrophysics",
"heliophysics",
"planetary"
]
Loading