31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
"""Elasticsearch mapping for news -> OpenAlex topic mapping indices.
|
|
|
|
One document per (news article, keyword) pair. Articles in aktuell_postproc
|
|
carry up to KEYWORD_LIMIT keywords each, so an article normally yields
|
|
several documents.
|
|
"""
|
|
|
|
NEWS_TOPICS_MAPPING = {
|
|
"properties": {
|
|
"news_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"},
|
|
}
|
|
}
|