Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Say why the search table could not be created

6b8f84c4f7f29442d737aa8b53fd39605cda4ecd · Keenan Nemetz · 9d ago · parent 41dd571f

Say why the search table could not be created

A build without FTS5 fails at index.Open with "no such module: fts5",
which names SQLite's internals but not the fix. Report the missing build
tag with it, and keep the table creation its own statement so that is the
error the operator sees.

(see README.md), or Open fails here with that reason. → forge/index/index.go +12−3

@@ -176,13 +176,17 @@ CREATE TABLE IF NOT EXISTS artifacts (
176 176 oid TEXT NOT NULL,
177 177 size INTEGER NOT NULL DEFAULT 0,
178 178 PRIMARY KEY (repo_id, tag, name)
179 );
180
179 );`); err != nil {
180 db.Close()
181 return nil, err
182 }
183 // search is the universal search surface: one row for every issue, change
184 // request and comment, with the text FTS5 tokenizes. The first four columns are
185 // UNINDEXED because they identify the result rather than match it; title and
186 // body are what a query looks at. FTS5 is a build choice (the bundled SQLite
187 // needs -tags sqlite_fts5, see README.md), so its absence is reported as that
188 // rather than as a bare "no such module".
189 if _, err := db.Exec(`
181 190 CREATE VIRTUAL TABLE IF NOT EXISTS search USING fts5(
182 191 repo_id UNINDEXED,
183 192 kind UNINDEXED,
@@ -194,7 +198,7 @@ CREATE VIRTUAL TABLE IF NOT EXISTS search USING fts5(
194 198 tokenize = 'unicode61 remove_diacritics 2'
195 199 );`); err != nil {
196 200 db.Close()
197 return nil, err
201 return nil, fmt.Errorf("index: cannot create the search table: SQLite has no FTS5 module (build with -tags sqlite_fts5): %w", err)
198 202 }
199 203 if err := s.migrate(); err != nil {
200 204 db.Close()