mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Support _search_COLUMN=text searches, closes #237
This commit is contained in:
parent
4d6a568d6c
commit
1259b8ac0b
5 changed files with 78 additions and 25 deletions
|
|
@ -248,16 +248,17 @@ INSERT INTO units VALUES (3, 100000, 75000);
|
|||
CREATE TABLE searchable (
|
||||
pk integer primary key,
|
||||
text1 text,
|
||||
text2 text
|
||||
text2 text,
|
||||
[name with . and spaces] text
|
||||
);
|
||||
|
||||
INSERT INTO searchable VALUES (1, 'barry cat', 'john dog');
|
||||
INSERT INTO searchable VALUES (2, 'terry cat', 'john weasel');
|
||||
INSERT INTO searchable VALUES (1, 'barry cat', 'terry dog', 'panther');
|
||||
INSERT INTO searchable VALUES (2, 'terry dog', 'sara weasel', 'puma');
|
||||
|
||||
CREATE VIRTUAL TABLE "searchable_fts"
|
||||
USING FTS3 (text1, text2, content="searchable");
|
||||
INSERT INTO "searchable_fts" (rowid, text1, text2)
|
||||
SELECT rowid, text1, text2 FROM searchable;
|
||||
USING FTS3 (text1, text2, [name with . and spaces], content="searchable");
|
||||
INSERT INTO "searchable_fts" (rowid, text1, text2, [name with . and spaces])
|
||||
SELECT rowid, text1, text2, [name with . and spaces] FROM searchable;
|
||||
|
||||
CREATE TABLE [select] (
|
||||
[group] text,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue