Event dates from the text, faster chunking, fixes
- enrich.events: take the date a sentence names (gestern, am Montag, am 12. November, 12.11.2026) within 60 days of publication; otherwise the publication date as before. -p redo=true rebuilds all extracted events. - enrich.embed: claim cursor instead of rescanning every claim per batch; a full sweep once a day - worker-enrich: two concurrent jobs, so one slow enricher can't block the rest - Loader: empty date strings are stored as no date (a news sitemap with an empty publication date failed every 20 minutes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7bd0142734
commit
0f7e003879
5 files changed
+138
-15
No files matched your search
@@ -109,7 +109,7 @@ class Loader:
|
||||
retrieved_at = now()
|
||||
RETURNING id
|
||||
""",
|
||||
(src["id"], ev.url, ev.title, ev.doc_type, ev.published_at, short, full_text, fetch_id,
|
||||
(src["id"], ev.url, ev.title, ev.doc_type, ev.published_at or None, short, full_text, fetch_id,
|
||||
Jsonb({**ev.meta, **({"tdm_reserved": True} if tdm else {})})),
|
||||
).fetchone()
|
||||
self.ctx.stats["documents"] += 1
|
||||
@@ -315,7 +315,8 @@ class Loader:
|
||||
updated_at = now()
|
||||
RETURNING id, (xmax = 0) AS inserted
|
||||
""",
|
||||
(c.claim_type, fp, person_id, org_id, cp_person, cp_org, c.occurred_at, c.valid_from, c.valid_to,
|
||||
(c.claim_type, fp, person_id, org_id, cp_person, cp_org, c.occurred_at or None, c.valid_from or None,
|
||||
c.valid_to or None,
|
||||
c.summary_de, c.summary_en, Jsonb(c.data), c.sensitive or c.claim_type == "legal_proceeding",
|
||||
"pending" if c.review else "published", self.ctx.adapter),
|
||||
).fetchone()
|
||||
|
||||
Reference in new issue
Block a user