Commit graph

26 commits

Author SHA1 Message Date
Jacob Chapman
ecf1d40112
table.search_sql(include_rank=True) option (#480)
* search_sql add include_rank option
* add test
* add FTS4 test
* Apply Black

Thanks, @chapmanjacobd
2022-08-30 20:40:35 -07:00
Simon Willison
42440d6345 Use parametrize for FTS test 2022-06-27 23:41:13 +00:00
Simon Willison
1b09538bc6 where= and where_args= parameters to search() and search_sql()
Closes #441
2022-06-14 14:54:35 -07:00
Edward Betts
b6c9dfce0b
Correct spelling mistakes (found with codespell) (#410) 2022-03-01 13:05:29 -08:00
Simon Willison
ee13f98c2c Better test for rebuild, refs #354 2021-12-10 16:59:37 -08:00
Simon Willison
8ae77a6961 table.search(quote=True) parameter, refs #296 2021-08-18 12:55:53 -07:00
Simon Willison
f0fd19267f Black/flake8, refs #246 2021-08-18 11:56:36 -07:00
Mark Neumann
53fec0d863
db.quote_fts() method, thanks Mark Neumann
Refs #296, closes #246.
2021-08-18 11:43:11 -07:00
Simon Willison
ef13bb046f Useful error message for enable_fts() on views, closes #220 2021-02-14 14:34:22 -08:00
Simon Willison
320f3ac33a offset= and limit= parameters, closes #231 2021-02-14 12:02:41 -08:00
Simon Willison
c5a798c15f .search_sql() fully respects columns=, closes #201
Refs #192 and #197
2020-11-08 08:53:53 -08:00
Simon Willison
bce1872109 order= is now order_by=, refs #197 2020-11-06 16:43:33 -08:00
Simon Willison
2bc1e9c5b4 Added test for .search_sql() and FTS4, refs #197 2020-11-06 16:32:40 -08:00
Simon Willison
771bd81b62 search_sql() returns most relevant first, not least
Refs #192
2020-11-06 15:50:02 -08:00
Simon Willison
63e2bdf18d Added test for sqlite-utils search, refs #192 2020-11-06 15:40:42 -08:00
Simon Willison
d411fba1f4 .search() works for FTS4, yields dicts
Closes #198, refs #197
2020-11-06 10:30:41 -08:00
Simon Willison
7c22a64fb6 .search() now works differently for FTS4 v.s. FTS5 2020-11-06 10:30:41 -08:00
Simon Willison
de39e8db1e Refactored to table.search_sql() method, added --limit 2020-11-06 10:30:41 -08:00
Simon Willison
ecb50c8f76 .enable_fts(..., replace=True) argument, closes #160 2020-09-20 15:05:46 -07:00
Simon Willison
64799df78b .optimize() no longer cleans up _docsize
This isn't necessary any more since the new .rebuild_fts()
method can achieve the same thing.

Refs #155, #153
2020-09-08 15:18:12 -07:00
Simon Willison
4c0f79398f table.rebuild_fts() method, refs #155 2020-09-08 15:09:25 -07:00
Simon Willison
cf2cb244fa
Tracer mechanism for showing underlying SQL queries
* Pass a tracer= function to Database constructor
* New db.tracer() contextmanager
* Neater SQL indentation, because tracer means it could be visible now
* New db.execute() and db.executescript() methods

Closes #150
2020-09-07 14:56:59 -07:00
Simon Willison
10c6fbc368 Applied Black 20.8b1, refs #142 2020-08-28 15:30:57 -07:00
Simon Willison
617e6f070c enable_fts(..., tokenize=X) parameter, refs #130 2020-08-01 13:40:36 -07:00
Simon Willison
0c36feb6ca .enable_fts() now works with columns with spaces in them, closes #90 2020-03-01 22:10:43 -08:00
Simon Willison
f9473ace14 disable-fts and .disable_fts(), closes #88 2020-02-26 20:40:35 -08:00
Renamed from tests/test_enable_fts.py (Browse further)