Sqlite3 FTS:限制匹配请求中两个单词之间的项目长度?

Omi*_*pha 1 regex sqlite full-text-search match

我有一个名为"topic_overview"的表,它有一个"topic_id"字段和一个"overview"字段.概述包含主题的文本描述(与主题的ID相关).

我试图弄清楚如何列出主题的ID,以便它们在概述字段中包含术语"word_1"和"word_2",其间不超过5个插入术语.

这就是我到目前为止所做的事情(我很难弄清楚限制word_1和word_2到5之间的项目数量的语法):

    SELECT id FROM topic_overview
    WHERE overview match 'word_1 AND word_2';
Run Code Online (Sandbox Code Playgroud)

Ulu*_*rov 5

使用NEAR查询

SELECT id FROM topic_overview
WHERE overview match 'word_1 NEAR/5 word_2';
Run Code Online (Sandbox Code Playgroud)