FTS4 SQLITE中的外部内容 [英] External content in FTS4 SQLITE

查看:181
本文介绍了FTS4 SQLITE中的外部内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VIEW view_for_search_unit和一个FTS4表FTS_table_search_unit.我使用以下命令将view_for_search_unit中的数据插入FTS表:

I have a VIEW view_for_search_unit and a FTS4 table FTS_table_search_unit. I inserted data from view_for_search_unit into the FTS table using this command:

INSERT INTO FTS_table_search_unit(docId, name, description)
SELECT id, name, description FROM view_for_search_unit

使用以下方法检查FTS表中的数据后:

After I check data in FTS table using this:

SELECT *FROM FTS_table_search_unit

它有1000条完美记录(我使用假数据).但是,当我使用MATCH FTS中的功能:

it has 1000 perfect records(I use fake data). However, when I use the MATCH function in FTS:

SELECT * FROM FTS_table_search_unit WHERE FTS_table_search_unit MATCH 's*'

我检索了1000条记录,但结果中的所有列均为NULL.问题是什么?我不明白,因为FTS_table_search_unit中有数据.

I retrieve 1000 records but all columns in the result are NULL. What is the problem? I can't understand because there is data in FTS_table_search_unit.

推荐答案

尝试使用docid代替*:

Try docid instead of *:

SELECT docid FROM FTS_table_search_unit 
WHERE FTS_table_search_unit 
MATCH 's*'

SELECT v.* FROM FTS_table_search_unit s
INNER JOIN view_for_search_unit v ON s.docid = v.id
WHERE FTS_table_search_unit MATCH 's*';

这篇关于FTS4 SQLITE中的外部内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆