
The new FTS1 module is the first in a planned series of loadable modules for SQLite that implement Full Text Search. The FTS1 module is available in SQLite version 3.3.8 and later.
Using FTS1
sqlite>create virtual table recipe using FTS1(name, ingredients);
You can insert rows into a full-text table in the same way as into an ordinary table with columns of type TEXT:
sqlite>insert into recipe (name, ingredients) values ('broccoli stew', 'broccoli peppers cheese tomatoes');
sqlite>insert into recipe (name, ingredients) values ('pumpkin stew', 'pumpkin onions garlic celery');
sqlite>insert into recipe (name, ingredients) values ('broccoli pie', 'broccoli cheese onions flour');
sqlite>insert into recipe (name, ingredients) values ('pumpkin pie', 'pumpkin sugar flour butter');
The MATCH operator performs a full-text match on a column in a full-text table:
sqlite> select rowid, name, ingredients from recipe where name match 'pie';
3|broccoli pie|broccoli cheese onions flour
4|pumpkin pie|pumpkin sugar flour butter
sqlite>
http://blog.carleson.net/htsrv/trackback.php/258
No Comments/Trackbacks/Pingbacks for this post yet...
Comments are not allowed from anonymous visitors.
warning: device /dev/null is full.
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||