OLD | NEW |
1 # 2006 September 13 | 1 # 2006 September 13 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #************************************************************************* | 10 #************************************************************************* |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 # invert: words for the bits of ~rowid | 108 # invert: words for the bits of ~rowid |
109 # | 109 # |
110 db eval { | 110 db eval { |
111 CREATE VIRTUAL TABLE t4 USING fts3([norm],'plusone',"invert"); | 111 CREATE VIRTUAL TABLE t4 USING fts3([norm],'plusone',"invert"); |
112 } | 112 } |
113 for {set i 1} {$i<=15} {incr i} { | 113 for {set i 1} {$i<=15} {incr i} { |
114 set vset [list [wordset $i] [wordset [expr {$i+1}]] [wordset [expr {~$i}]]] | 114 set vset [list [wordset $i] [wordset [expr {$i+1}]] [wordset [expr {~$i}]]] |
115 db eval "INSERT INTO t4(norm,plusone,invert) VALUES([join $vset ,]);" | 115 db eval "INSERT INTO t4(norm,plusone,invert) VALUES([join $vset ,]);" |
116 } | 116 } |
117 | 117 |
| 118 breakpoint |
118 do_test fts3ab-4.1 { | 119 do_test fts3ab-4.1 { |
119 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'norm:one'} | 120 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'norm:one'} |
120 } {1 3 5 7 9 11 13 15} | 121 } {1 3 5 7 9 11 13 15} |
121 do_test fts3ab-4.2 { | 122 do_test fts3ab-4.2 { |
122 execsql {SELECT rowid FROM t4 WHERE norm MATCH 'one'} | 123 execsql {SELECT rowid FROM t4 WHERE norm MATCH 'one'} |
123 } {1 3 5 7 9 11 13 15} | 124 } {1 3 5 7 9 11 13 15} |
124 do_test fts3ab-4.3 { | 125 do_test fts3ab-4.3 { |
125 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'one'} | 126 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'one'} |
126 } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} | 127 } {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} |
127 do_test fts3ab-4.4 { | 128 do_test fts3ab-4.4 { |
(...skipping 10 matching lines...) Expand all Loading... |
138 } {1 3 5 7 9 11 13 15} | 139 } {1 3 5 7 9 11 13 15} |
139 do_test fts3ab-4.8 { | 140 do_test fts3ab-4.8 { |
140 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'plusone:two norm:one'} | 141 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'plusone:two norm:one'} |
141 } {1 5 9 13} | 142 } {1 5 9 13} |
142 do_test fts3ab-4.9 { | 143 do_test fts3ab-4.9 { |
143 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'two norm:one'} | 144 execsql {SELECT rowid FROM t4 WHERE t4 MATCH 'two norm:one'} |
144 } {1 3 5 7 9 11 13 15} | 145 } {1 3 5 7 9 11 13 15} |
145 | 146 |
146 | 147 |
147 finish_test | 148 finish_test |
OLD | NEW |