First implementation (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
1 parent
34c0abb26a
commit
4fa326dc76
534 files changed
+28280
-37
No files matched your search
@@ -0,0 +1,32 @@
|
||||
-- scienting-bundle/1: the SQLite file a reader or a server reads.
|
||||
-- Normative: spec/13-database.md. SQLite only: it uses FTS5.
|
||||
-- A bundle holds sql/doc.sql and sql/store.sql, then these tables.
|
||||
-- License: CC0-1.0.
|
||||
|
||||
CREATE TABLE bundle_meta (
|
||||
name VARCHAR(64) NOT NULL,
|
||||
value TEXT NOT NULL,
|
||||
PRIMARY KEY (name)
|
||||
);
|
||||
|
||||
-- One row per searchable unit: a sentence, a cell, an equation outside a sentence, or a figure-text item.
|
||||
-- `unit` is sentence, cell, equation or figure-text. `context` is the kind of the node's parent:
|
||||
-- paragraph, heading, caption, footnote, row and so on. A figure-text item names its panel as `node`
|
||||
-- and its role as `context`. `text` is the normalized plain projection; withheld text is never indexed.
|
||||
CREATE VIRTUAL TABLE search USING fts5(
|
||||
doc_key UNINDEXED,
|
||||
node UNINDEXED,
|
||||
unit UNINDEXED,
|
||||
context UNINDEXED,
|
||||
text,
|
||||
tokenize = 'unicode61 remove_diacritics 2'
|
||||
);
|
||||
|
||||
-- Reserved for embeddings with sqlite-vec; see spec/13-database.md.
|
||||
CREATE TABLE embeddings_meta (
|
||||
model VARCHAR(128) NOT NULL,
|
||||
dimensions INTEGER NOT NULL,
|
||||
rights_use VARCHAR(64) NOT NULL,
|
||||
made_at VARCHAR(20) NOT NULL,
|
||||
PRIMARY KEY (model)
|
||||
);
|
||||
Reference in new issue
Block a user