feat(db): accent-insensitive search on postgres via unaccent by tink-bot · Pull Request #4162 · go-vikunja/vikunja · GitHub
Skip to content

feat(db): accent-insensitive search on postgres via unaccent - #4162

Merged
kolaente merged 5 commits into
mainfrom
feat/unaccent-search
Oct 22, 2026
Merged

kolaente merged 5 commits into
mainfrom
feat/unaccent-search

Conversation

@tink-bot

@tink-bot tink-bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Postgres search ignores case but not accents: manutencao misses "Manutenção", agua misses "água". When unaccent extension callable, db.ILIKE and db.SearchRelevanceOrder now wrap both sides in unaccent(). Detected at startup by calling unaccent('a'), so extension outside search_path counts as missing. Without extension, or on MySQL/SQLite: no change. Vikunja never runs CREATE EXTENSION itself.

CI: postgres job enables unaccent, paradedb job stays without, so both paths covered. Postgres paths not verified locally, only via CI.

Saved-filter ILIKE fix from issue already on main (3744b6a). Follow-up, out of scope: filter like operator still case-sensitive on Postgres.

Resolves #4131

How to verify

  1. Run Vikunja on Postgres and run CREATE EXTENSION unaccent; in its database, then restart Vikunja. The startup log shows "unaccent extension detected, search is accent-insensitive".
  2. Create a project titled "Manutenção" and a task titled "Água".
  3. Search for manutencao and agua in the quick-add/search bar.
  4. Expected: both the project and the task are found.
    Before this PR: neither is found.
  5. Drop the extension (DROP EXTENSION unaccent;) and restart. The same searches find nothing, and search otherwise behaves as before.

Wraps both sides in unaccent() on postgres when the extension is
callable, so searching "manutencao" finds "Manutenção".

Refs #4131
Without folding accents in SearchRelevanceOrder, "Água" matched a
search for "agua" but ranked like a substring match.

Refs #4131
@github-actions github-actions Bot added area/database Database engine behavior, schema issues, cross-engine DB bugs area/search Search UI and query behavior db/postgres PostgreSQL engine-specific issue labels Oct 15, 2026
@github-actions

Copy link
Copy Markdown

@kolaente
kolaente marked this pull request as ready for review October 22, 2026 09:58
@kolaente
kolaente merged commit c238056 into main Oct 22, 2026
42 checks passed
@kolaente
kolaente deleted the feat/unaccent-search branch October 22, 2026 09:58

This branch was successfully deployed

1 active deployment
preview-trusted — a6391950 Deployed Oct 15, 2026 by tink-bot via docker #5404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/database Database engine behavior, schema issues, cross-engine DB bugs area/search Search UI and query behavior db/postgres PostgreSQL engine-specific issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search ignores case but not accents on Postgres

2 participants