Commit Graph

486 Commits

Author SHA1 Message Date
dan ddf80eb8ce Test coverage improvements for fts3.c.
FossilOrigin-Name: a8b1d99899678b72c2a487909eabed321593d55f
2010-10-25 12:47:43 +00:00
dan 378d0ab97b Fixes for the matchinfo() function related to FTS4 common token handling.
FossilOrigin-Name: deb80eac9112d21835dfd3cee08ed8f09d975bf7
2010-10-23 19:07:30 +00:00
dan 789cb8f5cf Add missing comments and fix compiler warnings in new FTS3/4 code. Other minor fixes too.
FossilOrigin-Name: 1c9c70fec3c88319f7b2efe5316694a6ce0ab1a5
2010-10-22 16:44:39 +00:00
dan ca3b8f9c86 Merge trunk changes into experimental branch.
FossilOrigin-Name: fd1e5cade04961c2f5438a1dfcc2e15eafb4503f
2010-10-21 15:49:47 +00:00
dan 4e76cc3650 Updates to FTS4 to improve performance and make more accurate cost estimates for prefix terms.
FossilOrigin-Name: d0a450ce78e99f55c862f26f9332786660007a0a
2010-10-20 18:56:04 +00:00
dan 4f7c5e684a Experimental changes to fts4 to try to selectively avoid loading very large doclists.
FossilOrigin-Name: 5ae0ba447a561e3b6637b52f9b83a9fc683d2572
2010-10-19 14:07:59 +00:00
dan 8786f7f589 Have all FTS3 queries obtain a read or write table-lock at the shared-cache level before doing anything else.
FossilOrigin-Name: 018e82c775d0fb8c0d90cddf7a87c20c8c8172a9
2010-09-17 15:28:41 +00:00
dan a235d0ca63 Fixes to allow fts3 tables to be renamed mid-transaction.
FossilOrigin-Name: d1c875320a045c3938c765ceb543dfba1a0ecf0b
2010-08-24 16:59:47 +00:00
drh f053d5b6c7 Fix two comment typos that were reported on the mailing list.
FossilOrigin-Name: 88bf9016277c133dfbf4f4b2be0c35c9fe9fabd6
2010-08-09 14:26:32 +00:00
drh c78db070a3 Remove all vestiges of ctype.h from FTS3.
FossilOrigin-Name: b8b465ed2c56b23b50334680a2a940885b1ac530
2010-08-06 19:00:12 +00:00
dan a69f7d5aa5 Re-introduce the prefix-search optimization of [feef1b15d6], which was lost in a reorganization of FTS3 code.
FossilOrigin-Name: d692434b4935e8e7858230af1c126b0be8203077
2010-07-19 11:16:36 +00:00
shaneh 8a300f8095 Fix a couple more compiler warnings under MSVC.
FossilOrigin-Name: 26bc27e3f4c8a666f3358f73fc21eccdec3508f6
2010-07-02 18:15:31 +00:00
dan 6d3cb2fbae Fix for [9861b74ab9]. Correctly handle strings with zero tokens in the fts3 offsets() function.
FossilOrigin-Name: d37034f7fc46b83be681247fde97823736c994cc
2010-03-24 15:57:33 +00:00
drh 7bca0a3660 More commenting and documentation enhancements in FTS3.
FossilOrigin-Name: 892e286709c4a72aae364b85dd43bea525bb1b4d
2010-03-23 18:24:06 +00:00
drh d6291c9155 Fix up obsolete comments in FTS3 to conform to the latest nomenclature.
Add new comments to better explain FTS3 operation.

FossilOrigin-Name: 3e4a0082170155b5b779afd075a3ee650530ca68
2010-03-23 15:46:41 +00:00
dan 3b6f4c06ac Rewrite a couple of queries used internally by FTS3 to take advantage of the "SELECT max(x) FROM ..." optimization.
FossilOrigin-Name: b7e42ae77443b33e0ab83265064830594094dc7c
2010-03-19 06:59:19 +00:00
drh 71663ad0c1 Mark internal routines as "static" in FTS3.
Ticket [b1552d0fa7].

FossilOrigin-Name: 39b34ac4a7bd06144b3630c0ad71bad0615418b6
2010-03-18 16:34:44 +00:00
drh 3a3dd3ac8d Improved error message when the right-hand operand of MATCH in FTS3 is
not a valid search expression.  Ticket [170872f1c3].

FossilOrigin-Name: bea9258643edfeb98ebf59d93fa18a14e4221fea
2010-03-15 20:53:01 +00:00
drh 9396a41e6e Fix FTS3 so that it does not run illegal SQL and cause a spurious log
message.  Ticket [42d45a693e6].

FossilOrigin-Name: f186b6a61909be1d65b76a6fbaa42f57bbd0d1e5
2010-03-15 19:27:55 +00:00
drh 40d238e09f Disable FTS4 (which is incomplete and not ready for publication) to prevent
accidental use.

FossilOrigin-Name: 87a6a9970b8cea25fc5f8ff03d87762dd1166899
2010-03-09 12:35:21 +00:00
dan 89374d2309 Fix a one byte buffer overread in fts3.
FossilOrigin-Name: 6e3e014af91601ed1f3a9cbe23f7c4260a4d177f
2010-03-05 17:27:01 +00:00
shaneh 84f4b2f237 Minor changes to silence some compiler warnings with MSVC.
FossilOrigin-Name: 4927c62d6214d93e582bf1266215ed3519630c15
2010-02-26 01:46:54 +00:00
dan 56f2996b48 Fix a segfault in fts3 that may occur if the snippet, offsets or matchinfo functions are used in a query that does not contain a MATCH clause.
FossilOrigin-Name: 14ab536a96f81595ab8c3dcd4b72075f1a827c8b
2010-02-10 05:33:17 +00:00
drh b4a1fed2ea Add a new full-text search variant that tracks the total number of documents
and document sizes, to make ranking search results easier.  Currently
called FTS4.

FossilOrigin-Name: 1b6e6094c88214e02c9e3638932997ac20bfe413
2010-02-03 19:55:13 +00:00
dan d3789b98a7 Fix two similar problems in fts3 that meant that an OOM error could cause a memory leak.
FossilOrigin-Name: 701ef64b3dbf45e52043e79e528002bd4b7a21e2
2010-01-22 15:48:18 +00:00
dan 3996a06236 Add coverage tests for fts3_snippet.c. Also fixes related to the same.
FossilOrigin-Name: 5e9d8ccae9731f380527463ef87ddcd216b4b721
2010-01-15 17:25:52 +00:00
dan f596da5cc6 Update comments in fts3_snippet.c.
FossilOrigin-Name: dd9689b7c31861484f8d8062478ae73d3c940902
2010-01-12 17:57:30 +00:00
dan 9a34020f05 Modify snippets code to run more efficiently. And to avoid a bug relating to snippets based on full-text queries that contain duplicate terms.
FossilOrigin-Name: a2b1183d9e9898d06d623b342bbb552e85a9b3f6
2010-01-11 12:00:47 +00:00
dan 1a54b8ecfa Fix handling of an OOM error in the fts3 offsets() function. Fix a couple of snippet related test cases in e_fts3.test.
FossilOrigin-Name: 14dc46a74aafe44c0bf7dffd26268395b2c5edb2
2010-01-09 07:33:54 +00:00
drh 819443e506 Update comments in fts3.c to more accurately describe the doclist format.
FossilOrigin-Name: e424a0307359fee6875424c10ecad1a10acfba0e
2010-01-08 23:01:32 +00:00
dan 3174598a64 Fixes to problems in FTS3 snippet() function found by th3 tests.
FossilOrigin-Name: 3b5ccd2682176929f4da8a3f39a7e8f58b179f18
2010-01-07 10:54:28 +00:00
dan c06013dca7 Fix a segfault that can occur following an OOM in the FTS3 snippet() function
FossilOrigin-Name: c7e5966e3b031672f149d0b6e1f75f9bc40868fa
2010-01-06 18:36:27 +00:00
dan b023b04fcb Change the fts3 snippet function to return (hopefully) more relevant snippets in less time.
FossilOrigin-Name: 8a208223a74d451f60d9cd707d63fb7d157d1737
2010-01-06 17:19:21 +00:00
shaneh bb6b9878d7 Removed compiler warnings in MSVC.
FossilOrigin-Name: 4ecb4725b76042ac414caf90039d5d0a5f8f7068
2010-01-05 14:18:54 +00:00
dan a98af17af6 Add experimental implementation of FTS3 functions matchinfo() and snippet() (not enabled by default).
FossilOrigin-Name: 51f7ee844057086789dcfcdcba7daf45343cae62
2010-01-02 19:02:02 +00:00
shaneh 46aae3c0da Changes to remove warnings in MSVC build.
FossilOrigin-Name: 6cf76c2ae25d6e58926637ecd42eed6b300b1a25
2009-12-31 19:06:23 +00:00
dan 8718183ea5 Fix a bug triggered by optimizing an FTS3 table when there are no segments on disk but pending terms in the hash table.
FossilOrigin-Name: a3b50e4f80ca2dacc1f72435b8c72d55ffdb64e7
2009-12-29 10:32:36 +00:00
dan 3540c1f7b8 Add the experimental FTS3 matchinfo() function. Provides details of the match that may be used for result ranking and other purposes.
FossilOrigin-Name: 37a1de02d1d8a34604f1bee896eaf579d4ba149a
2009-12-22 18:56:19 +00:00
dan e61fc3b6a8 Fix a problem in FTS3 phrase queries. Add tests to check that it really is fixed.
FossilOrigin-Name: 956de051f43dfc2f178a7820981da4bf69927190
2009-12-20 15:00:19 +00:00
dan c007646318 Handle an unhandled OOM error code that occurs in fts3 with SQLITE_TEST defined.
FossilOrigin-Name: 82b069998e10b1a9a1d5e6bd85877d7b654c78bd
2009-12-14 15:17:27 +00:00
dan 971742058f Fix a broken assert() in fts3_write.c. Also fix a couple of compiler warnings in fts3 code.
FossilOrigin-Name: a730a05b39c45138765df98d34b9db1ab4e72152
2009-12-14 14:49:57 +00:00
dan ca6be31b69 Tests to cover a few extra branches in fts3.c.
FossilOrigin-Name: 06b72b007393dc34d75a8bb16ce0e4507d5f8faa
2009-12-12 19:15:27 +00:00
dan 55be7449f9 Further fts3 coverage tests.
FossilOrigin-Name: d2a8c0f683271f5fb8c9badfb13e4e46fd78db71
2009-12-12 16:04:32 +00:00
dan 45bcd6c274 Extra tests for coverage of fts3 code.
FossilOrigin-Name: eee921a99e69a9cd868a89de620bf47c4e26e4b5
2009-12-12 13:16:09 +00:00
dan f5fff2a7b2 Add coverage test cases for fts3.
FossilOrigin-Name: 8fcb0478c82507403165719724b62a308cb83b57
2009-12-12 09:51:25 +00:00
dan 601cd9aa24 Change the fts3 test interface used to configure the advisory node size paraemeter.
FossilOrigin-Name: 87fc0ce151c89beb5a43b65c0b1706f340c0c173
2009-12-11 16:03:45 +00:00
dan 4f887abc4c Rationalize some code in fts3 used by optimize operations, queries of the pending-terms hash table and segment merges. Add the "INSERT INTO tbl(tbl) VALUES('optimize')" syntax.
FossilOrigin-Name: 29476da353df4c67fe744c1c5f466ba5b9c1a54b
2009-12-11 12:29:04 +00:00
shaneh ef4114dd24 Avoid declaring and freeing test variables if SQLITE_TEST not defined.
FossilOrigin-Name: c2d22960f652264c48ec41b9ca4047aa142d86f7
2009-12-10 21:11:28 +00:00
dan dcf3cc1f91 Remove some unused macros and types from fts3.c.
FossilOrigin-Name: 83a80efe8a6c3d53a7f80b4c5f4e0f40aa0aa52f
2009-12-10 18:38:54 +00:00
dan 0502e56415 Fix handling of "WHERE col MATCH ? AND docid = ?" clauses in fts3.
FossilOrigin-Name: 6cbbae849990d99b7ffe252b642d6be49d0c7235
2009-12-10 18:29:04 +00:00
dan 2c11d597c7 Fix an OOM related problem in the snippet() and offsets() functions of fts3.
FossilOrigin-Name: 61efff414254f209f1c69728ae2da3b3888b7290
2009-12-10 18:20:31 +00:00
dan b893721a45 Changes to fts3 to avoid flushing data to disk within a SELECT statement.
FossilOrigin-Name: 48c0db0eb2d134bb302bb5eca6beb0ec46736257
2009-12-10 16:04:25 +00:00
dan 18ff7fa6b4 Improve test coverage of fts3.c.
FossilOrigin-Name: 56b6432f8622d53ffd3a4d9a2244114f8531ed71
2009-12-09 14:39:41 +00:00
dan 6d67e33776 Mark fts3ReallocOrFree and fts3InitVtab as static. Ticket [ff44d82f3b].
FossilOrigin-Name: a9038306c33c88120d8bef27209d8f0641c85c9b
2009-12-09 05:30:36 +00:00
dan 84db21ec6a Add tests to improve coverage of fts3. Associated bugfixes.
FossilOrigin-Name: f0eac4175aee6c50ee68acc253f76fbe44574250
2009-12-08 19:05:53 +00:00
dan 7bf44fc018 Remove a redundant line from fts3.
FossilOrigin-Name: cd50acf37fd1e3b388f98fb2df7ed03cff454b24
2009-12-07 16:26:52 +00:00
shaneh 0d935576a4 Move some SQLITE_TEST code down to avoid mixing code and variable declarations.
Fix a test for high-order bit handling in sqlite3Fts3InitTokenizer().

FossilOrigin-Name: fad43d290f9489726aaa2e999a17ea17ed78b27b
2009-12-07 16:18:37 +00:00
dan ff32e39c8e Add some tests for OR, AND and NOT operations to fts3rnd.test. Add tests to check that errors are returned when bad arguments are passed to fts3 functions snippet, offsets and optimize. Minor fix for the same
FossilOrigin-Name: 5811df3f0412598d189d46b58de4deff24573651
2009-12-07 12:34:51 +00:00
dan 28f372f6d9 Fix another bug in 3-way NEAR queries.
FossilOrigin-Name: 3bb13a06521b54194c9f3eb44e0dc42bacf016a4
2009-12-05 14:29:22 +00:00
dan 6e053f9c23 Fix some problems with FTS3 and 3-way NEAR queries.
FossilOrigin-Name: 23dc6fb5b28712d1ba18dc7ddb3f2ef3b469d611
2009-12-05 11:37:19 +00:00
dan 165b67cb36 Fix a problem involving a 3-way NEAR query.
FossilOrigin-Name: 507890a9139875b1b594225c432c714f67312c0e
2009-12-04 19:07:24 +00:00
dan acf28fbdd8 Modify [2ad1461f25] to avoid leaving a prepared statement in "active" state following an OOM error in FTS3.
FossilOrigin-Name: 69c21ee46aeeb624fd8638b17ff7259a3e5f9a46
2009-12-04 14:11:33 +00:00
drh 406a15ad8b Fix an FTS3 problem where an OOM error was not being propagated back
out to the top-level interface.

FossilOrigin-Name: 2ad1461f255c2499367b706a5ec65b44c1fc1618
2009-12-04 13:42:59 +00:00
dan e2e5145441 Fix an incorrect assert() in fts3.c. Add further fts3 tests.
FossilOrigin-Name: 75863c2d55e0801add5b8dcf88d575c5c870af04
2009-12-03 17:36:22 +00:00
shaneh e585b8f05c Updates to FTS3 to correct compiler warnings under MSVC.
FossilOrigin-Name: 37495b55ffbdc2db4482367ac7d8e32d4d71d58e
2009-12-03 06:26:46 +00:00
drh c12075b3b2 Change an error message in FTS3 to avoid using an uninitialized variable.
FossilOrigin-Name: 620a8a2b38f5f2ad3db304b2bc88360285c174db
2009-12-02 20:25:57 +00:00
dan bc7c039ce2 Clear the Pager.dbModified flag when unlocking the database. Assert that it is clear when locking the database.
FossilOrigin-Name: d17ec16b7c5051c904c09580a856593b2fb85edc
2009-12-02 14:44:32 +00:00
dan 6bd3b2aa64 Use #include "sqlite3.h" instead of <sqlite3.h> in fts3Int.h.
FossilOrigin-Name: 7737db490ceba02c29c36fe181b4e7895b40aa75
2009-12-01 17:08:09 +00:00
dan 8c4499764b Add typedefs for i16 and u8 to fts3Int.h when not building via the amalgamation method.
FossilOrigin-Name: fa56c1c47296c2f9ba1de9450d421dd06fde5a6a
2009-12-01 17:05:50 +00:00
drh 65e8c82e1a Changes to the TCL interface header to allow it to be compiled independently
from the amalgamation.

FossilOrigin-Name: 58113932d93926b4aa037a7487105a55f883cd0a
2009-12-01 13:57:48 +00:00
dan 3acb07d6c3 Open a savepoint within the FTS3 optimize() function.
FossilOrigin-Name: 4924fbb244bd1b7103e29e045812cb1c4d2d81c8
2009-12-01 13:48:13 +00:00
dan 612b1d5cd0 Fix a segfault that can occur when querying an empty FTS3 table. Also restore the rowid/docid conflict handling to work as it did in version 3.6.20.
FossilOrigin-Name: c022f66b5a65aa54d5ebd55cfe941118a2042280
2009-12-01 12:00:22 +00:00
drh ff3f307cd0 Test coverage improvements in the FTS3 porter stemmer.
FossilOrigin-Name: 6d112bfd53998b8f6693d3f2edbcd5ab4cdf5fb1
2009-11-30 19:48:16 +00:00
drh 0a62730d3f Updates to snippet() and offsets() functions of FTS3 so that they work
sanely following an OOM fault.

FossilOrigin-Name: b939a37a8ce296785a300e79ab9d3d87ad91343f
2009-11-28 21:33:21 +00:00
drh 9287d93c17 Change FTS3 to detect when the RHS of the MATCH opertor encounters an OOM
during string format conversion and report back an SQLITE_NOMEM error.

FossilOrigin-Name: 31eed4f8f95f0799d634eccbd9e09cb58172d250
2009-11-28 17:23:47 +00:00
drh 44c1e5a13c Remove all benign OOM failure opportunities from the FTS3 hash table
implementation.  All OOM faults cause SQLITE_NOMEM to be returned.

FossilOrigin-Name: 80754d383a0e890ea3f315dab941b9f166481ddd
2009-11-28 17:07:42 +00:00
dan 8e9f6aedae Add a test case for creating an FTS3 table with no module arguments or opening/closing brackets in the CREATE VIRTUAL TABLE statement.
FossilOrigin-Name: a9cba7ea0a06efa7a63a3069b219cc30fb127e98
2009-11-28 15:35:16 +00:00
dan 81fa6dc319 Fix a bug introduced by the fts3 refactoring (segfault when creating a table with zero module args). Also a fix to handle an OOM error.
FossilOrigin-Name: eada284bc10cafcab9beb3473bb0c70b3b4de2f9
2009-11-28 12:40:32 +00:00
dan f6d7b055fa Remove a C++ism accidentally added to fts3.c.
FossilOrigin-Name: 97d332416069d2fbce323740b276d0e7523eeee5
2009-11-27 12:14:47 +00:00
dan 7eee299243 Add some missing comments to fts3 files. No source code changes.
FossilOrigin-Name: b6402b2065b844acb3f1bb94ad964568706bcb86
2009-11-21 03:03:21 +00:00
dan e6828f5503 Merge leaf accidentally created by [1c4984c62f].
FossilOrigin-Name: cae949ce971ca216e0f8880b2f93866619fa05be
2009-11-20 10:23:12 +00:00
dan d1414c58e5 Improve comments and other things in fts3_write.c.
FossilOrigin-Name: 1cf0e3cc14bad22867e740736c2886dc1c4a48dc
2009-11-20 05:05:19 +00:00
dan d313865550 Minor optimizations to fts3 code.
FossilOrigin-Name: b456eacbbb16513d1b27e90015ea58a6dc92cc3b
2009-11-20 02:24:15 +00:00
dan 8f4a4f24dd Fix a performance regression introduced while reworking the fts3 code.
FossilOrigin-Name: 7cd178a72ab99c94fdacffb19aad819ae600e57d
2009-11-19 18:28:45 +00:00
dan 16708c4a0d Fix some fts3 related issues with the autoconf and amalgamation build systems.
FossilOrigin-Name: 3b17924754343c0163464dabf01a9c46ffccef28
2009-11-19 15:25:25 +00:00
dan 5dc842ddf7 Fix problems introduced into fts3 as part of the refactoring.
FossilOrigin-Name: fa0998e19d984ee57f4f506c34eb858026cc49c3
2009-11-19 00:15:27 +00:00
dan bd61689382 Add some missing comments and fix some other issues in fts3 code.
FossilOrigin-Name: 2fe579e778b75fbf503c02e01e5424c1926f2b49
2009-11-18 15:35:58 +00:00
dan f13b704ee6 Improvements to the way fts3 reads the full-text index.
FossilOrigin-Name: 45c051e78651d8204c17cecdda2bde705698881f
2009-11-17 12:52:10 +00:00
dan 948a5f88ea Add a few extra coverage test cases for fts3.
FossilOrigin-Name: f29c8fcade4aadeae3824975cf59f306c11c906b
2009-11-16 16:36:23 +00:00
dan 91f0ce39e4 Further OOM testing for fts3 code. Add Tcl code implementing an integrity-check for fts3.
FossilOrigin-Name: c27d46b33e8596b45c562c2742b05030e8899092
2009-11-14 11:41:00 +00:00
dan 09977bb9f0 Start reworking fts3 code to match the rest of SQLite (code conventions, malloc-failure handling etc.).
FossilOrigin-Name: 30a92f1132801c7582007ee625c577ea2ac31cdf
2009-11-13 10:36:20 +00:00
danielk1977 ee0484c1b5 Add the experimental API sqlite3_strnicmp(). Modify fts3 so that in terms like 'column_name:token' the column_name is interpreted in a case-insenstive fashion. Ticket #3996. (CVS 6950)
FossilOrigin-Name: 4571aa9e9142db465ae8250b0adf27e0a094331a
2009-07-28 16:44:26 +00:00
danielk1977 e932ba260e Fix a double-free that can occur when using the fts3 legacy syntax '-' operator. Add tests for the same operator. Ticket #3960. (CVS 6874)
FossilOrigin-Name: c19d419e8cf94a26d9bb6ad478e84841168a882e
2009-07-10 09:24:43 +00:00
danielk1977 2fe5cb1809 Avoid fts3 crash on (MATCH '""') expressions. Ticket #3717. (CVS 6343)
FossilOrigin-Name: 03679857a320517a7b89e5214e948bce9af896a9
2009-03-12 15:43:47 +00:00
shane be21779385 Corrected typos and misspellings. Ticket #3702. (CVS 6336)
FossilOrigin-Name: 6404afa0c515a6536fc2e878d4fb451e4dc06942
2009-03-05 04:20:31 +00:00
danielk1977 e1d3ac9cd0 Add a comment to fts3_tokenizer.h to make it clear how the xNext() method is supposed to set its output variables. Make sure the output variables of xNext() are only used if SQLITE_OK is returned. Ticket #3604. (CVS 6198)
FossilOrigin-Name: 5b3c075f96be9671d0bcffe928589b211559e835
2009-01-21 17:45:33 +00:00
drh d162988b47 Fix typos in comments in FTS3 implementation. (CVS 6178)
FossilOrigin-Name: b0f066630c35c4947d3ecd29d32d91036da19e94
2009-01-14 18:59:41 +00:00
drh be90df0b3e Do not display matches against
the right-hand side of a NOT operator in the output
of the FTS snippet() or offsets() functions. (CVS 6097)

FossilOrigin-Name: d44c84c0f77bd0fc4a9942177b6cae6d109b89b7
2009-01-02 01:10:42 +00:00
danielk1977 fc8c9f84ab Fix some problems in the fts3 expression parser with mismatched parenthesis. (CVS 6095)
FossilOrigin-Name: ccfe4580ac7ba9add0e69c786a9a3a43d69b7753
2009-01-01 14:06:13 +00:00
drh b39187ae89 Additional test cases and cleanup of FTS3 parenthesis processing. (CVS 6094)
FossilOrigin-Name: afac4293000f81410d105a99956605bf7102fa62
2009-01-01 12:34:45 +00:00
danielk1977 5973e6a30b Add pseudo-random tests of the fts3 expression parser. Revise the fix in (6091). (CVS 6092)
FossilOrigin-Name: 11c2d4686197fb3f0d601651d5bbb3492af8f0dd
2009-01-01 07:08:54 +00:00
danielk1977 49b4b4d84a Fix a bug parsing "<expr> AND (abc NEAR def)" in fts3_expr.c. (CVS 6091)
FossilOrigin-Name: d1a6a2edd799d65ff88510df951e909919e35b6b
2009-01-01 04:19:51 +00:00
drh 42128b9e33 Fix the name in the documentation of the compile-time macro for
enabling FTS3 parenthesis processing. (CVS 6089)

FossilOrigin-Name: ac8258da6ecd3ea37f394dc3b48834eb57832cf4
2008-12-31 19:27:53 +00:00
drh 757b178100 Fix the FTS3 expression parser so that it works in the amalgamation when
FTS3 is disabled. (CVS 6088)

FossilOrigin-Name: 7e238e8604b9a9f786d84a47d21c6b42f1585755
2008-12-31 16:27:58 +00:00
drh aeba020bea Fix the FTS3 module with parenthesis syntax so that it will work in
the amalgamation. (CVS 6087)

FossilOrigin-Name: c2b9891fc05ec05b270f108f61ab81b2df874e01
2008-12-31 16:01:04 +00:00
danielk1977 d597e08b23 Fix a bug in README.tokenizers. Ticket #3559. (CVS 6075)
FossilOrigin-Name: b8898d132e84888dc7c51b2f1ab67f78cc21f31b
2008-12-30 06:36:50 +00:00
danielk1977 d34c03a946 Add the file ext/fts3/README.syntax, containing documentation describing the two query syntaxes now supported by fts3. (CVS 6042)
FossilOrigin-Name: ed81ad5a5d22304a4d96e778e8e9094f74c461c0
2008-12-19 11:37:38 +00:00
danielk1977 f0f9f75443 Fix some strict-aliasing problems in fts3_expr.c. (CVS 6035)
FossilOrigin-Name: 20a4ca5d361ecbb982129171f10cccac4f5ad093
2008-12-17 15:49:51 +00:00
danielk1977 33e8903540 Modify fts3 to support a more complex expression syntax that allows parenthesis. The new syntax is not entirely backwards compatible, so is disabled by default. Use -DSQLITE_ENABLE_FTS3_PARENTHESIS to enable it. (CVS 6034)
FossilOrigin-Name: 7389b9ecb80294569845c40a23e0c832d07f7a45
2008-12-17 15:18:17 +00:00
danielk1977 777da0848d Fix a couple of memory leaks that may follow malloc failures. (CVS 5906)
FossilOrigin-Name: 4cf8a8e1bf22e1d8f7166e64328a95fe36c75033
2008-11-13 19:12:34 +00:00
drh 8578611b95 Fix the NEAR connector in FTS3 so that it can take ranges in excess of 9.
The maximum range is now 32767. (CVS 5695)

FossilOrigin-Name: 8e9b9553115c42dae38cad0612d98d9a0c453a5c
2008-09-12 18:25:30 +00:00
danielk1977 075c23af26 Begin adding support for the SQLITE_OMIT_WSD macro. Some (many) WSD variables still need wrappers added to them. (CVS 5652)
FossilOrigin-Name: 573d92abb9adb1c321ebc2fcadcf14374213b093
2008-09-01 18:34:20 +00:00
shess b5f94870c2 Re-used prepared statement from fts3 cursor. Previously, each call to
fulltextFilter() finalized any existing prepared statement and
prepared a new one.  In the case where idxNum has not changed, simply
reseting the statement suffices.  This provides an order of magnitude
speedup in incoming joins against docid. (CVS 5489)

FossilOrigin-Name: a08a5f2b1256b8a93beca5a359ccfc28d403efa3
2008-07-29 01:13:02 +00:00
shess 7d9ef0d0fc Implement optimize() function. This merges all segments in the fts
index into a single segment, including dropping delete cookies. (CVS 5417)

FossilOrigin-Name: b22e187bc2b38bd219dd0feba19b97279bd83089
2008-07-15 21:32:07 +00:00
shess c2c66a030d Delete all fts3 index data the table becomes empty. Previously,
deleting all rows from an fts3 table would leave a bunch of index data
describing the terms of the original data, plus deletions of those
terms, perhaps with some amount of it merged together so the deletions
knocked out the originals.  Even when all rows were deleted that
original data would hang out, though eventually it would mostly be
overwritten if new data contained the same set of terms. (CVS 5413)

FossilOrigin-Name: 8b872e426091d9ef108e52dbec0d968ed7452907
2008-07-14 20:43:15 +00:00
shess 6c106e3f3b fts3 functions for testing scripts. These are a first step towards
being able to write test script which verify that fts3 is internally
building indices in the expected way.  Both new functions are only
defined if fts3.c is compiled with SQLITE_TEST defined, as when
building testfixture.  These functions are not intended to be part of
the exposed fts3 API.

dump_terms() generates a TEXT result of all the terms in the index (or
a specified segment), sorted and joined with spaces.

dump_doclist() generates a TEXT representation of the doclist
associated with a given term in the index (or a specified segment). (CVS 5340)

FossilOrigin-Name: a48e3d95f7a656285e959cef595cbe6d53428ad9
2008-07-03 19:53:21 +00:00
drh 8a29dfdea0 Remove all instances of sprintf() from the FTS modules. Ticket #3049. (CVS 4996)
FossilOrigin-Name: 062bf5d44d53ae0ee2bf96eddcc8de09157aa789
2008-04-12 13:06:09 +00:00
drh dd95535f20 Minor fixes to FTS3 so that it works better when appended to the end
of the amalgamation. (CVS 4769)

FossilOrigin-Name: 62ede6699d8f116921a5a0baddca5e7e63740cd3
2008-02-01 15:34:09 +00:00
drh 820a90694e Version number to 3.5.5. Include FTS3 in the amalgamation by default
(but disabled unless compiled with -DSQLITE_ENABLE_FTS3).  Fix a memory
allocation problem. (CVS 4757)

FossilOrigin-Name: 72411043e60d5358d5a7adf566d662d65d3b3336
2008-01-31 13:35:48 +00:00
drh 85b623f2f9 Change all instances of "it's" in comments to either "its" or "it is",
as appropriate, in case the comments are ever again read by a pedantic
grammarian.  Ticket #2840. (CVS 4629)

FossilOrigin-Name: 4e91a267febda572e7239f0f1cc66b3102558c36
2007-12-13 21:54:09 +00:00
shess b6a75606ed Change prefix search from O(N*M) to O(NlogM). The previous code
linearly merged the doclists, so as the accumulated list got large,
things got slow (the M term, a fucntion of the number of documents in
the index).  This change does pairwise merges until a single doclist
remains.  A test search of 't*' against a database of RFC text
improves from 1m16s to 4.75s. (CVS 4599)

FossilOrigin-Name: feef1b15d645d638b4a05742f214b0445fa7e176
2007-12-07 23:47:53 +00:00
drh 8255feca02 The FTS3 amalgamation can now be appended to the SQLite amalgamation to
generate a single source file that contains both components. (CVS 4558)

FossilOrigin-Name: 0fc61f99b54bd269fcc011f448b9b971e902cb01
2007-11-24 00:41:52 +00:00
drh ac320cc14a Add a #include of sqlite3.h to fts3_hash.c. Tickets #2762 and #2777. (CVS 4555)
FossilOrigin-Name: c8485eb8bc62c810ec9f73e103468c57116fd94c
2007-11-23 18:01:07 +00:00
drh 613a0fe455 Changes fts3 to use only sqlite3_malloc() and not system malloc.
Ticket #2762. (CVS 4554)

FossilOrigin-Name: 460af6bb668094c99a1d4dc1540b44b6d1d036b6
2007-11-23 17:31:17 +00:00
shess cd7274ceb0 Don't do anything when input doclists are both empty. Ticket #2774 (CVS 4546)
FossilOrigin-Name: 75cb46f82a6a95dbe9e279dede299bafa2e91cae
2007-11-16 00:23:07 +00:00
shess adafd5747f Be a bit more susicious of invalid results from the tokenizer. (CVS 4514)
FossilOrigin-Name: deb8f56d3adea0025d28b8effabec7c7b7fe3026
2007-10-24 23:24:22 +00:00
shess b6d78dc7bb fts3.c buildTerms() passes -1 for nInput. (CVS 4511)
FossilOrigin-Name: e87c883a1235ac47ee340a31051dcd5deb369d4e
2007-10-24 21:52:37 +00:00
danielk1977 1c1764ae66 Add the NEAR operator to fts3. (CVS 4502)
FossilOrigin-Name: aef7720e0bb49d52332ddebe6f698feb926ef7d7
2007-10-22 18:02:20 +00:00
drh 8a07c7a414 Cleanup the hash functions in FTS3. (CVS 4440)
FossilOrigin-Name: ac645c8f30aac0d98fc481260084c9bd3975a845
2007-09-20 12:53:27 +00:00
shess 961303c1e7 Drop the forced error from fts3.c and add forced errors to fts2.c and
fts1.c. (CVS 4427)

FossilOrigin-Name: fec6567a0f8a868cda9bba2a473491dfb17b6c88
2007-09-13 18:16:08 +00:00
shess d83ae45639 Add an implicit (HIDDEN) docid column. This works as an alias to
rowid, similar to how things work in SQLite tables with INTEGER
PRIMARY KEY.  Add tests to verify operation. (CVS 4426)

FossilOrigin-Name: c8d2345200f9ece1af712543982097d0b6f348c7
2007-09-13 18:14:49 +00:00
shess 0ec85ae216 Mark the table-named column HIDDEN. Add tests to make sure it's
working as expected. (CVS 4425)

FossilOrigin-Name: ca669eaf1b4af441741129bee4af02f32a7c74b8
2007-09-13 18:12:09 +00:00
shess 27a770e044 Fix memory leak of InteriorReader.term. Comes up when doing queries
against large segments. (CVS 4315)

FossilOrigin-Name: 6c617bd89fc57881a2a308a6360e8ebb42835d46
2007-08-28 20:36:53 +00:00
shess bae37537b0 Make comments and variable naming more consistent WRT rowid versus
docid/blockid.  This should have no code impact. (CVS 4281)

FossilOrigin-Name: 76f1e18ebc25d692f122784e87d202992c4cfed2
2007-08-23 20:28:49 +00:00
shess 6beeb0329a Fix fts3 to not have the VACUUM bug from fts2. %_content.docid is an
alias to fix the rowid for documents, %_segments.blockid is an alias
to fix the rowid for segment blocks.  Unit test for the problem. (CVS 4280)

FossilOrigin-Name: 6eb2d74a8cfce322930f05c97d4ec255f3711efb
2007-08-23 20:23:37 +00:00
shess acce22f5c7 Copy fts2 to fts3, renaming, and replacing references to fts2 with
fts3, including capitalization variants. (CVS 4249)

FossilOrigin-Name: 216c91d2fc49792d9ff53596746f1162f5b7f8d4
2007-08-20 17:37:02 +00:00