最新のSQLite3.7.15.2シェル(Win32)をダウンロードし、http://sqlite.org/fts3.html#section_3に記述されているとおりにFTSの例の1つを実行しようとしました。
-- 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';
どちらも機能せず、アプリで必要なそのタイプのクエリ。それが機能するようにそれを書く他の方法はありますか?