Fix some matchinfo related test problems in fts3rnd.test.
FossilOrigin-Name: da7abe05887d1ad52552d8ce3a153a0a76f96c5a
This commit is contained in:
parent
a2460e0730
commit
ceafa47b41
24
manifest
24
manifest
@ -1,8 +1,5 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA1
|
||||
|
||||
C Comment\scleanup\sin\ssqliteInt.h.
|
||||
D 2010-01-14T00:39:26
|
||||
C Fix\ssome\smatchinfo\srelated\stest\sproblems\sin\sfts3rnd.test.
|
||||
D 2010-01-14T11:17:05
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -407,7 +404,7 @@ F test/fts3expr2.test 18da930352e5693eaa163a3eacf96233b7290d1a
|
||||
F test/fts3malloc.test d02ee86b21edd2b43044e0d6dfdcd26cb6efddcb
|
||||
F test/fts3near.test 2e318ee434d32babd27c167142e2b94ddbab4844
|
||||
F test/fts3query.test 154fe4b015fd61af523ee083570a134f508f5be7
|
||||
F test/fts3rnd.test 153b4214bad6084a348814f3dd651a92e2f31d9b
|
||||
F test/fts3rnd.test 2f5761db9dd92f6fe09d08976ac658ef521846ed
|
||||
F test/fts3snippet.test 16a05b313bf85da4d0b5cb683549fc2279430fbe
|
||||
F test/func.test af106ed834001738246d276659406823e35cde7b
|
||||
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
|
||||
@ -788,14 +785,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
P 56f232d562bc239103a5afd2e64c4b926a20de08
|
||||
R 3b331cd0e95e4d69ff5c9f9bfafab8bd
|
||||
U drh
|
||||
Z b5abd666e8f857d795728a3a90d182a6
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||
|
||||
iD8DBQFLTmfWoxKgR168RlERAikxAJ9Wj+u6555vXm+xBTOR0LRgevvzlQCcDtL6
|
||||
h1OBnqJI6Rk9bG44HfgzbwU=
|
||||
=19E+
|
||||
-----END PGP SIGNATURE-----
|
||||
P 67c3aea563e019083f0ed87b57982a0379637d4f
|
||||
R 8e69825ad6823779e3340d8c7cfb5e0a
|
||||
U dan
|
||||
Z b7d555c32c5b8aefdf64aab0d007e815
|
||||
|
@ -1 +1 @@
|
||||
67c3aea563e019083f0ed87b57982a0379637d4f
|
||||
da7abe05887d1ad52552d8ce3a153a0a76f96c5a
|
@ -159,25 +159,41 @@ proc simple_phrase {zPrefix} {
|
||||
set ret
|
||||
}
|
||||
|
||||
# This [proc] is used to test the FTS3 matchinfo() function.
|
||||
#
|
||||
proc simple_token_matchinfo {zToken} {
|
||||
set total(0) 0
|
||||
set total(1) 0
|
||||
set total(2) 0
|
||||
|
||||
foreach key [lsort -integer [array names ::t1]] {
|
||||
set nDoc(0) 0
|
||||
set nDoc(1) 0
|
||||
set nDoc(2) 0
|
||||
set nHit(0) 0
|
||||
set nHit(1) 0
|
||||
set nHit(2) 0
|
||||
|
||||
|
||||
foreach key [array names ::t1] {
|
||||
set value $::t1($key)
|
||||
set cnt [list]
|
||||
set a($key) [list]
|
||||
foreach i {0 1 2} col $value {
|
||||
set n [llength [lsearch -all $col $zToken]]
|
||||
lappend cnt $n
|
||||
incr total($i) $n
|
||||
}
|
||||
if {[lindex [lsort $cnt] end]} {
|
||||
lappend ret $key [concat 1 3 XXX $cnt]
|
||||
set hit [llength [lsearch -all $col $zToken]]
|
||||
lappend a($key) $hit
|
||||
incr nHit($i) $hit
|
||||
if {$hit>0} { incr nDoc($i) }
|
||||
}
|
||||
}
|
||||
|
||||
string map [list XXX "$total(0) $total(1) $total(2)"] $ret
|
||||
|
||||
set ret [list]
|
||||
foreach docid [lsort -integer [array names a]] {
|
||||
if { [lindex [lsort -integer $a($docid)] end] } {
|
||||
set matchinfo [list 1 3]
|
||||
foreach i {0 1 2} hit $a($docid) {
|
||||
lappend matchinfo $hit $nHit($i) $nDoc($i)
|
||||
}
|
||||
lappend ret $docid $matchinfo
|
||||
}
|
||||
}
|
||||
|
||||
set ret
|
||||
}
|
||||
|
||||
proc simple_near {termlist nNear} {
|
||||
|
Loading…
Reference in New Issue
Block a user