Current behaviour (RuDS): Both FTS index paths pass DB content only:
crates/bds-core/src/engine/post.rs fn fts_index_post (~line 898) passes post.content.as_deref() and t.content.clone().
crates/bds-core/src/engine/search.rs fn index_project (~line 196) does the same during rebuild.
Published posts/translations have content = NULL in the DB (body lives only in the .md file), so their bodies are never indexed — body search over a published blog finds nothing.
bDS2 behaviour:../bDS2/lib/bds/search.ex — post_content/1 (~line 657) and translation_content/2 (~line 670) fall back to reading the markdown body from file_path when DB content is nil.
Task: Thread data_dir into both index paths and read the body from the post/translation file when DB content is NULL (reuse read_post_file/read_translation_file; the editor-body resolver pattern already exists — see specs/post.alliumeditor_body). Also unify the fallback stemmer language: fts_index_post uses unwrap_or("en") while the rebuild path uses project mainLanguage — bDS2 uses post language, else project main language, in both paths.
Acceptance: Red/green TDD — new test: publish a post with a distinctive body word, search finds it; same for a published translation. Rebuild path test likewise. cargo test --workspace green (loopback-server tests need network-bind permission on first run).
**Source:** Audit section 1.2 (high impact). Compat contract: "full-text search behaviour MUST stay identical" (`specs/bds.allium`).
**Current behaviour (RuDS):** Both FTS index paths pass DB content only:
- `crates/bds-core/src/engine/post.rs` fn `fts_index_post` (~line 898) passes `post.content.as_deref()` and `t.content.clone()`.
- `crates/bds-core/src/engine/search.rs` fn `index_project` (~line 196) does the same during rebuild.
Published posts/translations have `content = NULL` in the DB (body lives only in the .md file), so their bodies are never indexed — body search over a published blog finds nothing.
**bDS2 behaviour:** `../bDS2/lib/bds/search.ex` — `post_content/1` (~line 657) and `translation_content/2` (~line 670) fall back to reading the markdown body from `file_path` when DB content is nil.
**Task:** Thread `data_dir` into both index paths and read the body from the post/translation file when DB content is NULL (reuse `read_post_file`/`read_translation_file`; the editor-body resolver pattern already exists — see `specs/post.allium` `editor_body`). Also unify the fallback stemmer language: `fts_index_post` uses `unwrap_or("en")` while the rebuild path uses project mainLanguage — bDS2 uses post language, else project main language, in both paths.
**Acceptance:** Red/green TDD — new test: publish a post with a distinctive body word, search finds it; same for a published translation. Rebuild path test likewise. `cargo test --workspace` green (loopback-server tests need network-bind permission on first run).
hugo
added the bug label 2026-07-20 19:43:56 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Source: Audit section 1.2 (high impact). Compat contract: "full-text search behaviour MUST stay identical" (
specs/bds.allium).Current behaviour (RuDS): Both FTS index paths pass DB content only:
crates/bds-core/src/engine/post.rsfnfts_index_post(~line 898) passespost.content.as_deref()andt.content.clone().crates/bds-core/src/engine/search.rsfnindex_project(~line 196) does the same during rebuild.Published posts/translations have
content = NULLin the DB (body lives only in the .md file), so their bodies are never indexed — body search over a published blog finds nothing.bDS2 behaviour:
../bDS2/lib/bds/search.ex—post_content/1(~line 657) andtranslation_content/2(~line 670) fall back to reading the markdown body fromfile_pathwhen DB content is nil.Task: Thread
data_dirinto both index paths and read the body from the post/translation file when DB content is NULL (reuseread_post_file/read_translation_file; the editor-body resolver pattern already exists — seespecs/post.alliumeditor_body). Also unify the fallback stemmer language:fts_index_postusesunwrap_or("en")while the rebuild path uses project mainLanguage — bDS2 uses post language, else project main language, in both paths.Acceptance: Red/green TDD — new test: publish a post with a distinctive body word, search finds it; same for a published translation. Rebuild path test likewise.
cargo test --workspacegreen (loopback-server tests need network-bind permission on first run).hopefully fixed with fix on github