CREATE TABLE ft_docs (
id INTEGER NOT NULL PRIMARY KEY,
docid INTEGER NULL,
tipo INTEGER NULL,
contenido TEXT NULL
);
CREATE INDEX IDX_FT_DOCS_ ON ft_docs(
id ASC,
docid ASC,
tipo ASC
);
CREATE TABLE ft_index (
docid INTEGER NULL,
wordid INTEGER NULL,
posicion INTEGER NULL,
ranking FLOAT NULL,
lang INTEGER NULL
);
CREATE INDEX IDX_FT_INDEX_ ON ft_index(
posicion ASC,
docid ASC,
wordid ASC,
ranking ASC,
lang ASC
);
CREATE TABLE ft_lang (
id INTEGER NOT NULL PRIMARY KEY,
lang VARCHAR(10) UNIQUE NOT NULL
);
CREATE INDEX IDX_FT_LANG_ ON ft_lang(
lang ASC
);
CREATE TABLE ft_tipos (
id INTEGER NOT NULL PRIMARY KEY,
titulo VARCHAR(10) UNIQUE NOT NULL
);
CREATE INDEX IDX_FT_TIPOS_ ON ft_tipos(
titulo ASC
);
CREATE TABLE ft_word (
id INTEGER NOT NULL,
word VARCHAR(30) UNIQUE NOT NULL,
stemmed VARCHAR(10) NULL,
lang INTEGER NULL
);
CREATE INDEX IDX_FT_WORD_ ON ft_word(
word ASC,
stemmed ASC,
lang ASC
);
|