SQLite Forum

Unable to search an FTS5 trigram table when using external content
Login
Hello. I'm attempting to create an FTS5 trigram table to text search a separate table. I used the external content option and I know it at least sees the data because when I select all with no where clause it does show data. Below is a minimal example to see it not working. SQLite version 3.34.1

```
sqlite> CREATE TABLE test(id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT);
sqlite> INSERT INTO test(data) VALUES('testing foo bar');
sqlite> SELECT * FROM test;
1|testing foo bar
sqlite> CREATE VIRTUAL TABLE fts USING fts5(data, content=test, content_rowid=id, tokenize'trigram');
sqlite> SELECT * FROM fts;
testing foo bar
sqlite> SELECT * FROM fts('foo');
sqlite> SELECT * FROM fts WHERE fts = 'foo';
sqlite> SELECT * FROM fts WHERE fts MATCH 'foo';
sqlite> SELECT * FROM fts WHERE data MATCH 'foo';
sqlite> SELECT * FROM fts WHERE data = 'foo';
```
You can see none of the 5 queries I tried with searches returned anything. I tested non external content and it worked fine. Am I doing something wrong?