memorix_search finds no Chinese or Japanese text without embeddings (Orama default tokenizer)
Summary
With embeddings off (the default), memorix_search returns nothing for Chinese or Japanese text, even an exact title or entity name. The same calls with English text match.
Repro
memorix 1.9.10 (npm, same code as main af25502), memorix serve --mode lite, fresh HOME, LLM and embeddings off. The search footer says _Search mode: fulltext_.
memorix_store {"entityName":"缓存模块","type":"gotcha","title":"缓存过期时间设置","narrative":"缓存过期时间设置为三十分钟,否则会导致数据库连接池耗尽。"}
memorix_search {"query":"缓存过期时间设置"} # exact title -> No memories found
memorix_search {"query":"缓存"} -> No memories found
memorix_search {"query":"缓存模块"} # exact entity name -> No memories found
memorix_search {"query":"テスト"} # katakana word in a title -> No memories found
The rows are in SQLite: SELECT ... MATCH '"缓存过期时间设置"' on the FTS5 table returns the row. Reproduced in two separate HOME dirs.
Cause
Below 10,000 observations per project (shouldUsePersistentSearch, src/store/orama-store.ts:69-83), search uses the in-memory Orama index; MEMORIX_PERF=1 shows oramaSearch for these queries. That index is created with create({ schema }) (src/store/orama-store.ts:420), so it gets Orama's default tokenizer, which only emits Latin letters and digits. CJK text produces no tokens.
Checked directly against the bundled @orama/orama 3.1.18: inserting {title: '缓存过期时间设置'} and searching that exact term gives count: 0; the same with an English title gives count: 1.
Possible fix
Pass a tokenizer to create() (components.tokenizer) that keeps Latin tokens as today and emits CJK character bigrams (plus unigrams for single characters). Queries go through the same tokenizer, so both sides line up. A test with a Chinese title, a Chinese substring and a katakana word would cover it.
Related but different: #126 (vectors for CJK paraphrase recall when embeddings are on), #324 / #325 (FTS5 syntax, hybrid after maintenance). Happy to send the tokenizer PR if that direction works for you; I have #329 open here, so I'd wait for that first.
Confirmed the report against the current architecture: below the persistent-search threshold, the in-memory Orama index uses its default tokenizer, while the SQLite FTS path can still match the same CJK rows. This is independent of the alias/maintenance fixes in PR #331.
The proposed focused direction is reasonable: a custom Orama tokenizer that preserves current Latin token behavior and adds bounded CJK unigrams/bigrams, with matching regression tests for Chinese exact/substring queries and Japanese text. I am keeping this as a separate issue/PR so it does not get mixed into the already-running hook and large-store change.
Implemented in PR #333: https://github.com/AVIDS2/memorix/pull/333
The in-memory Orama index now preserves Latin tokenization and adds bounded character unigrams/bigrams for Chinese, Japanese, and Korean text. Exact CJK titles, short substrings, and the normal observation search path now work with embeddings disabled.
Validation: lint, build, focused tokenizer/lexical fallback tests, and the full suite passed. The PR also restores npm test compatibility with Vitest 5 by removing the unsupported --minWorkers=1 option. Keeping the issue open until the PR merges.
Update: PR #333 now has all repository CI checks green across Ubuntu, Windows, macOS, Docker, typecheck, Node 26, and registry metadata. The issue will close automatically when the PR merges; it remains open pending independent review.