我已经下载了最新的 SQLite 3.7.15.2 shell (Win32) 并尝试完全按照http://sqlite.org/fts3.html#section_3中的内容执行 FTS 示例之一
-- Virtual table declaration
CREATE VIRTUAL TABLE docs USING fts3();
-- Virtual table data
INSERT INTO docs(docid, content) VALUES(1, 'a database is a software system');
INSERT INTO docs(docid, content) VALUES(2, 'sqlite is a software system');
INSERT INTO docs(docid, content) VALUES(3, 'sqlite is a database');
-- Return the set of documents that contain the term "sqlite", and the
-- term "database". This query will return the document with docid 3 only.
SELECT * FROM docs WHERE docs MATCH 'sqlite AND database';
但尽管最后一条评论 SELECT 导致空集。它是 SQLite 中的错误还是只是过时的文档?(以及正确的语法是什么?)。
对我来说最重要的是那个查询
SELECT * FROM docs WHERE docs MATCH '(database OR sqlite) NEAR/5 system';
也不起作用,我在我的应用程序中需要那种类型的查询。有没有其他方法可以编写它以便它工作?