fix: route macro_news documents as macro_event so global event classification runs
This commit is contained in:
@@ -211,15 +211,15 @@ async def persist_broker_event(
|
|||||||
def _resolve_document_type(source_type: str) -> str:
|
def _resolve_document_type(source_type: str) -> str:
|
||||||
"""Map source_type to a document_type value.
|
"""Map source_type to a document_type value.
|
||||||
|
|
||||||
Note: macro_news articles default to 'article' — the extractor
|
Note: macro_news articles are typed as 'macro_event' so the parser
|
||||||
reclassifies them as 'macro_event' only if the content is truly
|
routes them to the macro classification queue for global event
|
||||||
about macro/global events (not company-specific news).
|
extraction rather than standard company-level extraction.
|
||||||
"""
|
"""
|
||||||
mapping = {
|
mapping = {
|
||||||
"news_api": "article",
|
"news_api": "article",
|
||||||
"filings_api": "filing",
|
"filings_api": "filing",
|
||||||
"web_scrape": "press_release",
|
"web_scrape": "press_release",
|
||||||
"macro_news": "article",
|
"macro_news": "macro_event",
|
||||||
}
|
}
|
||||||
return mapping.get(source_type, "article")
|
return mapping.get(source_type, "article")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user