【发布时间】:2016-04-07 17:16:42
【问题描述】:
我正在对一个 sqlite 数据库运行这些精确的全文搜索。除了数字之外,它们都是准确的,我在此处添加了这些数字以供识别:
1) A lot of it is caused by insecurities, issues that can trouble you so much that you end up losing your focus.
2) Surely all this is taken in consideration."
3)Discussing the experience of working with his long-deceased coach, Charlie Hilmann is characteristically fond: "We would spend as many as 10 hours in the field, and we eventually delivered just as much as expected.
4) It was challenging.
5)I realized that it's the greatest thing for me if I can use all of the peculiarity of a given moment within a given context, leverage all the inspiration and push it hard to go beyond.
6) You pull out something from the experience that really makes a difference."
7) Constant reminders of the fearless warriors that Charlie and Garrett used to be are the images and stories, relics of a time when experiencing pain and loss was no more than a requirement for achievement and success.
8) That was just the beginning of a journey, with hope and resolve at the forefront and a hunger toward one goal that I knew I could conquer.
所有这些字符串都逐字存在于数据库中。 100% 匹配。 SQLite 找不到查询 2、4 和 6。我不知道为什么。它可能是行尾的不成对引号(它们存在于存储在数据库中的确切字符串中),但是查询#4 有什么问题?
但让我来到这里的真正问题是查询 #3。它会导致错误:
FTS expression tree is too large (maximum depth 12)
怀疑冒号和引号,我把中间的字符串剪掉了,就在“喜欢”之后,再试一次。我仍然得到错误。为什么?是不是太长了?但查询 #7 更长,不会导致任何错误。事实上,我这里还有其他查询,它们的长度大约是查询 #3 的 10 倍,并且它们有效。
谷歌搜索对我没有多大帮助,我无法理解我在该主题上找到的所有内容。但无论如何,我在 sqlite3.c 中使用选项 SQLITE_MAX_EXPR_DEPTH 0 编译了我自己的 sqlite 库,但似乎没有任何改变。我仍然收到查询 #3 的错误,即使我将它切成两半。
有什么想法吗?
【问题讨论】:
-
注意:除了将
SQLITE_MAX_EXPR_DEPTH设置为0之外,我还将SQLITE_FTS3_MAX_EXPR_DEPTH从12增加到24并重新编译,但错误消息仍然显示"(maximum depth 12)"。
标签: sqlite