Add robust company slug for job-offer blacklist matching
Company matching relied on normText(), which kept legal-form suffixes, spacing and umlaut spelling — so "Bosch GmbH", "Bosch AG" and "bosch gmbh" did not match the same entry, making the blacklist unreliable. Introduce firmaSlug(): transliterate German umlauts, strip diacritics and trailing legal-form tokens (GmbH/AG/SE/KG/…), then kebab-join. Add a firma_slug field to jobangebote_blacklist (schema + ALTER/backfill migration) and match on it for typ firma/firma_stelle/auto, falling back to firma_norm for legacy rows. POST /joboffers rejects blacklisted offers via matchBlacklist automatically since offerSignature now carries the slug. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -938,6 +938,7 @@ function buildOpenApiSpec(baseUrl = '') {
|
||||
quelle: { type: 'string', nullable: true },
|
||||
external_id: { type: 'string', nullable: true },
|
||||
firma_norm: { type: 'string', nullable: true },
|
||||
firma_slug: { type: 'string', nullable: true, description: 'Rechtsform-/Umlaut-robuster Firmen-Slug; primärer Abgleich für typ=firma/firma_stelle/auto.' },
|
||||
stelle_norm: { type: 'string', nullable: true },
|
||||
ort_norm: { type: 'string', nullable: true },
|
||||
firma: { type: 'string', nullable: true },
|
||||
|
||||
Reference in New Issue
Block a user