| OLD | NEW | 
|---|
| 1 | 1 | 
| 2 # 2007 October 15 | 2 # 2007 October 15 | 
| 3 # | 3 # | 
| 4 # The author disclaims copyright to this source code.  In place of | 4 # The author disclaims copyright to this source code.  In place of | 
| 5 # a legal notice, here is a blessing: | 5 # a legal notice, here is a blessing: | 
| 6 # | 6 # | 
| 7 #    May you do good and not evil. | 7 #    May you do good and not evil. | 
| 8 #    May you find forgiveness for yourself and forgive others. | 8 #    May you find forgiveness for yourself and forgive others. | 
| 9 #    May you share freely, never taking more than you give. | 9 #    May you share freely, never taking more than you give. | 
| 10 # | 10 # | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 69   execsql {SELECT docid FROM t1 WHERE content MATCH 'one NEAR five'} | 69   execsql {SELECT docid FROM t1 WHERE content MATCH 'one NEAR five'} | 
| 70 } {1 3} | 70 } {1 3} | 
| 71 | 71 | 
| 72 do_test fts3near-1.14 { | 72 do_test fts3near-1.14 { | 
| 73   execsql {SELECT docid FROM t1 WHERE content MATCH 'four NEAR four'} | 73   execsql {SELECT docid FROM t1 WHERE content MATCH 'four NEAR four'} | 
| 74 } {} | 74 } {} | 
| 75 do_test fts3near-1.15 { | 75 do_test fts3near-1.15 { | 
| 76   execsql {SELECT docid FROM t1 WHERE content MATCH 'one NEAR two NEAR one'} | 76   execsql {SELECT docid FROM t1 WHERE content MATCH 'one NEAR two NEAR one'} | 
| 77 } {3} | 77 } {3} | 
| 78 | 78 | 
|  | 79 do_test fts3near-1.16 { | 
|  | 80   execsql { | 
|  | 81     SELECT docid FROM t1 WHERE content MATCH '"one three" NEAR/0 "four five"' | 
|  | 82   } | 
|  | 83 } {1} | 
|  | 84 do_test fts3near-1.17 { | 
|  | 85   execsql { | 
|  | 86     SELECT docid FROM t1 WHERE content MATCH '"four five" NEAR/0 "one three"' | 
|  | 87   } | 
|  | 88 } {1} | 
|  | 89 | 
| 79 | 90 | 
| 80 # Output format of the offsets() function: | 91 # Output format of the offsets() function: | 
| 81 # | 92 # | 
| 82 #     <column number> <term number> <starting offset> <number of bytes> | 93 #     <column number> <term number> <starting offset> <number of bytes> | 
| 83 # | 94 # | 
| 84 db eval { | 95 db eval { | 
| 85   INSERT INTO t1(content) VALUES('A X B C D A B'); | 96   INSERT INTO t1(content) VALUES('A X B C D A B'); | 
| 86 } | 97 } | 
| 87 do_test fts3near-2.1 { | 98 do_test fts3near-2.1 { | 
| 88   execsql { | 99   execsql { | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 147   execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/2 two'} | 158   execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/2 two'} | 
| 148 } {{0 1 4 3 0 0 8 5 0 1 14 3 0 0 27 5}} | 159 } {{0 1 4 3 0 0 8 5 0 1 14 3 0 0 27 5}} | 
| 149 do_test fts3near-3.5 { | 160 do_test fts3near-3.5 { | 
| 150   execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'two NEAR/2 three'} | 161   execsql {SELECT offsets(t1) FROM t1 WHERE content MATCH 'two NEAR/2 three'} | 
| 151 } {{0 0 4 3 0 1 8 5 0 0 14 3 0 1 27 5}} | 162 } {{0 0 4 3 0 1 8 5 0 0 14 3 0 1 27 5}} | 
| 152 do_test fts3near-3.6 { | 163 do_test fts3near-3.6 { | 
| 153   execsql { | 164   execsql { | 
| 154     SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/0 "two four"' | 165     SELECT offsets(t1) FROM t1 WHERE content MATCH 'three NEAR/0 "two four"' | 
| 155   } | 166   } | 
| 156 } {{0 0 8 5 0 1 14 3 0 2 18 4}} | 167 } {{0 0 8 5 0 1 14 3 0 2 18 4}} | 
|  | 168 breakpoint | 
| 157 do_test fts3near-3.7 { | 169 do_test fts3near-3.7 { | 
| 158   execsql { | 170   execsql { | 
| 159     SELECT offsets(t1) FROM t1 WHERE content MATCH '"two four" NEAR/0 three'} | 171     SELECT offsets(t1) FROM t1 WHERE content MATCH '"two four" NEAR/0 three'} | 
| 160 } {{0 2 8 5 0 0 14 3 0 1 18 4}} | 172 } {{0 2 8 5 0 0 14 3 0 1 18 4}} | 
| 161 | 173 | 
| 162 db eval { | 174 db eval { | 
| 163   INSERT INTO t1(content) VALUES(' | 175   INSERT INTO t1(content) VALUES(' | 
| 164     This specification defines Cascading Style Sheets, level 2 (CSS2). CSS2 is a
      style sheet language that allows authors and users to attach style (e.g., fonts
     , spacing, and aural cues) to structured documents (e.g., HTML documents and XML
      applications). By separating the presentation style of documents from the conte
     nt of documents, CSS2 simplifies Web authoring and site maintenance. | 176     This specification defines Cascading Style Sheets, level 2 (CSS2). CSS2 is a
      style sheet language that allows authors and users to attach style (e.g., fonts
     , spacing, and aural cues) to structured documents (e.g., HTML documents and XML
      applications). By separating the presentation style of documents from the conte
     nt of documents, CSS2 simplifies Web authoring and site maintenance. | 
| 165 | 177 | 
| 166     CSS2 builds on CSS1 (see [CSS1]) and, with very few exceptions, all valid CS
     S1 style sheets are valid CSS2 style sheets. CSS2 supports media-specific style 
     sheets so that authors may tailor the presentation of their documents to visual 
     browsers, aural devices, printers, braille devices, handheld devices, etc. This 
     specification also supports content positioning, downloadable fonts, table layou
     t, features for internationalization, automatic counters and numbering, and some
      properties related to user interface. | 178     CSS2 builds on CSS1 (see [CSS1]) and, with very few exceptions, all valid CS
     S1 style sheets are valid CSS2 style sheets. CSS2 supports media-specific style 
     sheets so that authors may tailor the presentation of their documents to visual 
     browsers, aural devices, printers, braille devices, handheld devices, etc. This 
     specification also supports content positioning, downloadable fonts, table layou
     t, features for internationalization, automatic counters and numbering, and some
      properties related to user interface. | 
| 167   ') | 179   ') | 
| 168 } | 180 } | 
| 169 do_test fts3near-4.1 { | 181 do_test fts3near-4.1 { | 
| 170   execsql { | 182   execsql { | 
| 171     SELECT snippet(t1) FROM t1 WHERE content MATCH 'specification NEAR supports' | 183     SELECT snippet(t1) FROM t1 WHERE content MATCH 'specification NEAR supports' | 
| 172   } | 184   } | 
| 173 } {{<b>...</b> devices, handheld devices, etc. This <b>specification</b> also <b
     >supports</b> content positioning, downloadable fonts, <b>...</b>}} | 185 } {{<b>...</b>braille devices, handheld devices, etc. This <b>specification</b> 
     also <b>supports</b> content positioning, downloadable fonts, table layout<b>...
     </b>}} | 
| 174 | 186 | 
| 175 do_test fts3near-5.1 { | 187 do_test fts3near-5.1 { | 
| 176   execsql { | 188   execsql { | 
| 177     SELECT docid FROM t1 WHERE content MATCH 'specification attach' | 189     SELECT docid FROM t1 WHERE content MATCH 'specification attach' | 
| 178   } | 190   } | 
| 179 } {2} | 191 } {2} | 
| 180 do_test fts3near-5.2 { | 192 do_test fts3near-5.2 { | 
| 181   execsql { | 193   execsql { | 
| 182     SELECT docid FROM t1 WHERE content MATCH 'specification NEAR attach' | 194     SELECT docid FROM t1 WHERE content MATCH 'specification NEAR attach' | 
| 183   } | 195   } | 
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 563   } | 575   } | 
| 564 } {} | 576 } {} | 
| 565 do_test fts3near-6.5 { | 577 do_test fts3near-6.5 { | 
| 566   execsql { | 578   execsql { | 
| 567     SELECT docid FROM t1 WHERE content MATCH 'abbrev NEAR/10000 zygosis' | 579     SELECT docid FROM t1 WHERE content MATCH 'abbrev NEAR/10000 zygosis' | 
| 568   } | 580   } | 
| 569 } {3} | 581 } {3} | 
| 570 | 582 | 
| 571 | 583 | 
| 572 finish_test | 584 finish_test | 
| OLD | NEW | 
|---|