mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Change the fts3 snippet function to return (hopefully) more relevant snippets in less time.
FossilOrigin-Name: 8a208223a74d451f60d9cd707d63fb7d157d1737
This commit is contained in:
@ -53,6 +53,10 @@ do_test fts3al-1.3 {
|
||||
#
|
||||
# The trailing and leading hi-bit chars help with code which tests for
|
||||
# isspace() to coalesce multiple spaces.
|
||||
#
|
||||
# UPDATE: The above is no longer true; there is no such code in fts3.
|
||||
# But leave the test in just the same.
|
||||
#
|
||||
|
||||
set word "\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80xxxxx\x80"
|
||||
set phrase1 "$word $word $word target $word $word $word"
|
||||
@ -64,6 +68,6 @@ db eval "INSERT INTO t4 (content) VALUES ('$phrase2')"
|
||||
|
||||
do_test fts3al-1.4 {
|
||||
execsql {SELECT rowid, length(snippet(t4)) FROM t4 WHERE t4 MATCH 'target'}
|
||||
} {1 111 2 117}
|
||||
} {1 241 2 247}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user