-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
old code
def is_jfm(hit) -> bool:
try:
return hit["_source"]["database"] == "JFM"
except KeyError:
return False
def append_set_info(hit, parent, doc):
classification = collect_info_for_hit(hit, "classification")
sets = {""}
for v in str(classification).split(";"):
sets.add(v.strip()[0:2])
sets.remove("")
if is_jfm(hit):
sets.add("JFM")
# sorted is required for integration tests
for s in sorted(sets):
node = doc.createElement("setSpec")
node.appendChild(doc.createTextNode(s))
parent.appendChild(node)Metadata
Metadata
Assignees
Labels
No labels