On 11/27/2012 11:42 AM, Eric wrote:
The following SQL results in X'0100000006000000'.
For reference, "na" option should generate total number of documents
and the average number of tokens per document.

CREATE VIRTUAL TABLE IF NOT EXISTS fts USING fts4(body);
REPLACE INTO fts ( docid, body ) VALUES (1, "one two three four");
REPLACE INTO fts ( docid, body ) VALUES (2, "one two");
SELECT quote(matchinfo(fts,'na')) FROM fts WHERE fts.body match 'three';

If "REPLACE" is replaced with "INSERT" in the above, the result is
X'0200000003000000', as expected.
In either case, the number of rows in fts is as expected, body column
is correct, and other matchinfo options (pclx at least), seem to
function correctly.

Is REPLACE not allowed for fts4 tables, or is this a bug?

It's a bug. Now fixed here:

  http://www.sqlite.org/src/info/e38fb02d5e

Fix will appear in 3.7.15.

Dan.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to