在Android SQLite中,我得到了这样的表格
domainObjectId: String // like '9876543210'
name: String
description: String
我想在此使用FTS进行搜索而不必担心变音符号,我想如何通过键入对象ID的一部分(例如最后4个字符)让用户选择?
我有喜欢的选择
`SELECT * FROM tabel LEFT JOIN tabel_fts WHERE tabel_fts MATCH '3210*' OR tabel.domainObjectId LIKE '%3210%'
但是作为回报,我得到了错误
unable to use function MATCH in the requested context (code 1 SQLITE_ERROR);
是否可以添加附加条件以通过MATCH
选择?
尝试将“ MATCH”删除为单独的“ SELECT”:
`SELECT * FROM tabel LEFT JOIN (select * from tabel_fts WHERE tabel_fts.domainObjectId MATCH '3210*') as tabel_fts WHERE tabel.domainObjectId LIKE '%3210%' OR table_fts.ID IS NOT NULL
顺便说一句: