feat: dictionaries hold words or characters, and are asked by their source
A dictionary source now says what it holds (`kind`: `words`, the default for files from before, or `characters`), a string so that an app older than a new kind leaves it out. Search, countLabelled and labelled take the dictionary by its source and meaning language, as the unique index names it, rather than by the language: with KANJIDIC2 beside JMdict, a search for words would otherwise bring kanji, and JLPT N5 would hold both. The search reads the language for its query variants from the source's row; a dictionary the instance doesn't hold finds nothing. The rank index goes by source too. Migration: drops and recreates dictionary_entry_rank_idx on (source, glossLanguage, rank), and adds dictionary_source.kind, text NOT NULL DEFAULT 'words', so a JMdict loaded before is a dictionary of words. Both tables are reference data, never synced; the old server keeps working until the switch (its queries by language just lose the index). In the app, a studyset's dictionary is one of words unless a kind is asked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
e42cdfbfcb
commit
a6699b30cb
1 changed files with 11756 additions and 84 deletions
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue