feat(search): add exact company aliases

Embed a versioned local alias overlay and rank exact aliases before legal-name matches and word prefixes. Normalize Unicode consistently, deduplicate by company identity before limiting, and update bilingual search guidance and tests.

Refs #24

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 18:08:35 +01:00
parent 64a7124889
commit f7b057efa3
13 changed files with 413 additions and 43 deletions

View File

@ -83,7 +83,7 @@ test('admin creates a user who follows a fake company and generates a private su
await page.goto(new URL('/assets', baseURL).href)
const oldFollows = page.getByRole('region', { name: /autres suivis existants/i })
await expect(oldFollows).toContainText('Historic index follow')
const query = page.getByRole('textbox', { name: "Nom de l'entreprise" })
const query = page.getByRole('textbox', { name: 'Nom ou nom courant de l’entreprise' })
await query.fill(fixture.companyQuery)
await page.getByRole('button', { name: 'Rechercher' }).click()
const results = page.getByRole('region', { name: 'Résultats des entreprises' })

View File

@ -43,7 +43,7 @@ test('ticket #19: search companies by name and follow by company_id while preser
await page.goto(new URL('/assets', stack.frontendUrl).href)
await expect(page.getByRole('heading', { name: 'Rechercher une entreprise' })).toBeVisible({ timeout: 3000 })
const query = page.getByRole('textbox', { name: /nom de l'entreprise/i })
const query = page.getByRole('textbox', { name: /nom ou nom courant de l’entreprise/i })
await expect(page.getByRole('textbox')).toHaveCount(1)
await query.fill('BYD')
await page.getByRole('button', { name: /rechercher/i }).click()