On 06/30/2018 10:24 PM, Dudu Markovitz wrote:
Hi

according to the documentation -
6.2.2. External Content FTS4 Tables

An "external content" FTS4 table is similar to a contentless table, except
that if evaluation of a query requires the value of a column other than
docid, FTS4 attempts to retrieve that value from a table (or view, or
virtual table) nominated by the user (hereafter referred to as the "content
table").

However I see no example for a query on the fts table that implicitly
retrieves values from the content table, nor could I find any in other
place.
All my attempts to write such a query ended up with "Error: no such
column".
Am I missing something or is it a problem in the documentation?

I don't think I understand the question. What do you want it to do?

The SELECT query in the second block of code in that section:

  https://sqlite.org/fts3.html#_external_content_fts4_tables_

is:

  SELECT * FROM t3 WHERE t3 MATCH 'k'

t3 is the FTS4 table. The query does a lookup on the FTS4 index to find matches for token 'k', then automatically retrieves values from the content table (t2) for each matched row. The first instance of the SELECT in the block of code shows everything working as expected, the subsequent two show the counter-intuitive effects of allowing the FTS index to get out of sync with the content table.

Dan.


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

Reply via email to