initial commit

This commit is contained in:
Sebastian Hugentobler 2025-07-01 08:55:08 +02:00
commit 0bd97d0ed3
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
25 changed files with 6581 additions and 0 deletions

View file

@ -0,0 +1,11 @@
CREATE TABLE documents (
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
book_id BIGINT NOT NULL,
version INTEGER NOT NULL,
text_chunk TEXT NOT NULL,
embedding vector(384) NOT NULL
);
CREATE INDEX ON documents
USING ivfflat (embedding vector_cosine_ops)
WITH (lists = 100);

View file

@ -0,0 +1,4 @@
CREATE TABLE hashes (
book_id BIGINT PRIMARY KEY,
hash BYTEA
);