31 lines
1.1 KiB
Python
31 lines
1.1 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.
|
|
"""
|
|
|
|
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"},
|
|
}
|
|
}
|