Stop the text-search comment naming one language

The choice is unchanged and now better argued: a deployment does not announce
which language its notes are in, so any stemmer picked here is the wrong one
somewhere — and applying the wrong one does not fail loudly, it quietly stops
finding things.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5 committed 2026-09-27 08:09:49 +02:00
1 parent 2bf7de1a43
commit f2f375d824
2 files changed
+8 -5

No files matched your search

@@ -29,9 +29,12 @@ CREATE TABLE memory_notes (
-- Touched on every write, so retention measures how long a note has gone
-- unrefreshed rather than how old it is.
updated_at BIGINT NOT NULL,
-- 'simple' rather than a language configuration: these are an agent's own
-- notes, in whatever language it chose, and stemming English rules over
-- Turkish text would quietly stop finding things.
-- 'simple' rather than a language configuration. These are an agent's own
-- notes, in whatever language it chose, and a deployment does not announce
-- which that is — so any stemmer picked here is the wrong one somewhere.
-- Applying English rules to text that is not English does not fail loudly:
-- it quietly stops finding things, which is the worst way for a search to
-- be wrong.
search tsvector GENERATED ALWAYS AS (
to_tsvector('simple', coalesce(key, '') || ' ' || coalesce(text, '') || ' ' || coalesce(tags, ''))
) STORED,