Commit Graph

639 Commits

Author SHA1 Message Date
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