| OLD | NEW |
| 1 # 2010 October 23 | 1 # 2010 October 23 |
| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 ] | 114 ] |
| 115 | 115 |
| 116 set sqlite_fts3_enable_parentheses 1 | 116 set sqlite_fts3_enable_parentheses 1 |
| 117 do_execsql_test 2.2.$tn.3 { | 117 do_execsql_test 2.2.$tn.3 { |
| 118 SELECT mit(matchinfo(t2, 'x')) FROM t2 WHERE t2 MATCH 'g OR (g z)'; | 118 SELECT mit(matchinfo(t2, 'x')) FROM t2 WHERE t2 MATCH 'g OR (g z)'; |
| 119 } [list \ | 119 } [list \ |
| 120 [list 1 2 2 1 2 2 1 54 54] \ | 120 [list 1 2 2 1 2 2 1 54 54] \ |
| 121 [list 1 2 2 1 2 2 0 54 54] \ | 121 [list 1 2 2 1 2 2 0 54 54] \ |
| 122 ] | 122 ] |
| 123 set sqlite_fts3_enable_parentheses 0 | 123 set sqlite_fts3_enable_parentheses 0 |
| 124 |
| 125 do_execsql_test 2.2.$tn.4 { |
| 126 SELECT mit(matchinfo(t2, 'x')) FROM t2 WHERE t2 MATCH 'e "g z"'; |
| 127 } [list \ |
| 128 [list 1 2 2 1 2 2] \ |
| 129 ] |
| 124 } | 130 } |
| 125 | 131 |
| 126 do_execsql_test 2.3.1 { | 132 do_execsql_test 2.3.1 { |
| 127 CREATE VIRTUAL TABLE t3 USING fts4; | 133 CREATE VIRTUAL TABLE t3 USING fts4; |
| 128 INSERT INTO t3 VALUES('a b c d e f'); | 134 INSERT INTO t3 VALUES('a b c d e f'); |
| 129 INSERT INTO t3 VALUES('x b c d e f'); | 135 INSERT INTO t3 VALUES('x b c d e f'); |
| 130 INSERT INTO t3 VALUES('d e f a b c'); | 136 INSERT INTO t3 VALUES('d e f a b c'); |
| 131 INSERT INTO t3 VALUES('b c d e f'); | 137 INSERT INTO t3 VALUES('b c d e f'); |
| 132 INSERT INTO t3 VALUES(''); | 138 INSERT INTO t3 VALUES(''); |
| 133 INSERT INTO t3 VALUES(''); | 139 INSERT INTO t3 VALUES(''); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 147 } | 153 } |
| 148 } { | 154 } { |
| 149 execsql $sql | 155 execsql $sql |
| 150 do_execsql_test 2.4.$tn { | 156 do_execsql_test 2.4.$tn { |
| 151 SELECT docid, mit(matchinfo(t3, 'pcxnal')) FROM t3 WHERE t3 MATCH '"a b c"'; | 157 SELECT docid, mit(matchinfo(t3, 'pcxnal')) FROM t3 WHERE t3 MATCH '"a b c"'; |
| 152 } {1 {1 1 1 4 4 11 912 6} 3 {1 1 1 4 4 11 912 6}} | 158 } {1 {1 1 1 4 4 11 912 6} 3 {1 1 1 4 4 11 912 6}} |
| 153 } | 159 } |
| 154 | 160 |
| 155 | 161 |
| 156 finish_test | 162 finish_test |
| OLD | NEW |