Open
Description
SQLite's FTS3 and FTS4 (full-text search) extension modules allow users to create special tables with a built-in full-text index. This extension is usually enabled by default. (I checked: most platforms we support have a version of SQLite compiled with ENABLE_FTS3).
To leverage this, the create table syntax and query syntax are slightly different.
CREATE VIRTUAL TABLE enrondata1 USING fts3(content TEXT); /* FTS3 table */
CREATE TABLE enrondata2(content TEXT); /* Ordinary table */
SELECT count(*) FROM enrondata1 WHERE content MATCH 'linux'; /* FTS search -- fast */
SELECT count(*) FROM enrondata2 WHERE content LIKE '%linux%'; /* regular search -- slow */
To enable this in EF, we would need to add some kind of configuration option to specific which tables are FTS and make query respond accordingly.
In the meantime, users can work around this with MigrationBuilder.Sql
and FromSql
.
More docs: https://www.sqlite.org/fts3.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment