Files
smartguide/service/scripts/projects/topic_mapper/mapping.py
T
arzani 81527a9d8d
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev Build started...
dfg compatible, added experiment logs of multipliers
2026-07-16 19:35:28 +02:00

32 lines
1.2 KiB
Python

"""Elasticsearch mapping for project -> OpenAlex topic mapping indices.
One document per (project, keyword) pair. For sources where the keyword field
is unique per project (e.g. projects_bund_v1 Leistungsplansystematik_fullname)
this means one document per project; for multi-valued sources (e.g.
dfg_projects_2.0 subject_classifications.fach) several documents per project.
"""
PROJECT_TOPICS_MAPPING = {
"properties": {
"project_id": {"type": "keyword"},
"keyword": {"type": "text", "fields": {"keyword": {"type": "keyword"}}},
"source_index": {"type": "keyword"},
"source_field": {"type": "keyword"},
"topic_matches": {
"type": "nested",
"properties": {
"rank": {"type": "integer"},
"topic_id": {"type": "keyword"},
"topic_display_name": {"type": "keyword"},
"subfield": {"type": "keyword"},
"field": {"type": "keyword"},
"domain": {"type": "keyword"},
"match_score": {"type": "float"},
},
},
"match_method": {"type": "keyword"},
"model_name": {"type": "keyword"},
"built_at": {"type": "date"},
}
}