System.Data.Sqlite and FTS4

孤街浪徒 提交于 2019-12-05 05:18:17

问题


Why when i write a query with fulltext Search syntax like:

SELECT * FROM TABLENAME WHERE TABLENAME MATCH 'ColumnA:word1 OR ColumnB:word2'

The query result always return 0 rows?

I'm using VBnet and the latest Ado.net provider from sqlite.org

The problem is when i try the query with and external tool, it works well (with sqlite 3.7.9).

Any clues? Thanks in advance


回答1:


Although System.Data.Sqlite is compiled using SQLITE_ENABLE_FTS3 and supports FTS, it doesn't compiled with SQLITE_ENABLE_FTS3_PARENTHESIS which enables Enhanced Query Syntax. And you are using Enhanced Query Syntax in your query, thus it didn't works as you expect.

You need to either modify you query, or do a custom build (follow build procedures) of System.Data.Sqlite with SQLITE_ENABLE_FTS3_PARENTHESIS defined.



来源:https://stackoverflow.com/questions/9989237/system-data-sqlite-and-fts4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!