Damien Elmes
3392fe8708
increase the rated search cap to 365, and allow searches for ease 0
...
An add-on appears to use ease 0 when rescheduling cards, and it may
make sense for Anki to do the same in the future as well.
2020-03-21 16:05:17 +10:00
Damien Elmes
cf50821d3b
add search that ignores combining chars
...
On a test of a ~40k card collection, the 'ignore accents' add-on
takes about 1150ms, and this code takes about 70ms.
2020-03-21 15:15:59 +10:00
Damien Elmes
32efd1789b
support regexp search in single field
2020-03-21 13:06:46 +10:00
Damien Elmes
d53c8f18ad
support wildcard in field*:val search
2020-03-21 12:45:25 +10:00
Damien Elmes
0a6c5dd240
don't require wildcard for unicode case folding in search
2020-03-21 12:44:56 +10:00
Damien Elmes
982e1a811d
add unicase collation
...
sqlite's like is hard-coded to use ASCII comparisons, so we can't
take advantage of this yet
2020-03-21 12:40:20 +10:00
Damien Elmes
9dd5fef0a1
support regex searches
2020-03-21 12:00:48 +10:00
Damien Elmes
e0e7560d2b
add regexp() to sqlite
2020-03-21 10:23:11 +10:00
Damien Elmes
861139ea9e
support deck:"foo bar" style searches
2020-03-21 09:34:24 +10:00
Damien Elmes
0089f0149a
add note searching
2020-03-21 09:00:05 +10:00
Damien Elmes
a1853db3d8
fix formatting and unit test
2020-03-21 08:17:24 +10:00
Damien Elmes
f3a4552df3
don't set deck.sched.today in test
2020-03-21 08:12:32 +10:00
Damien Elmes
3cebb5b3fd
update tests to reflect what now constitutes an error
2020-03-21 08:12:01 +10:00
Damien Elmes
18b37bcb59
tests need to flush before searching
2020-03-21 08:10:52 +10:00
Damien Elmes
e060e0daee
handle escaped tag searches and tag:* special case
2020-03-21 08:09:28 +10:00
Damien Elmes
551aa135d6
check for child decks case-insensitively
2020-03-21 07:57:07 +10:00
Damien Elmes
798ea78a37
don't crash when card:0 passed in
2020-03-21 07:56:55 +10:00
Damien Elmes
25c4b8466e
handle * in single-field search
2020-03-21 07:56:32 +10:00
Damien Elmes
c173e4a175
fix ease search
2020-03-21 07:56:09 +10:00
Damien Elmes
67d1842691
enable sorting on the extra browser columns
2020-03-21 07:55:53 +10:00
Damien Elmes
23717089e9
add the ability to provide a custom sort order; use backend for find
2020-03-21 07:55:21 +10:00
Damien Elmes
6769edaa58
don't require trailing whitespace in .sql files
2020-03-21 07:49:44 +10:00
Damien Elmes
cdb85ef72e
disable word wrap in browser rows
2020-03-20 21:15:23 +10:00
Damien Elmes
f3296382ea
ensure endReset() is called even if an exception is raised
2020-03-20 21:15:23 +10:00
Damien Elmes
46851d7aa9
support sorting on tags
...
I don't personally understand it, but some users seem to want it.
2020-03-20 21:15:23 +10:00
Damien Elmes
9810b584d5
support sorting on note type, card template and decks
2020-03-20 21:15:23 +10:00
Damien Elmes
c13056773b
flush config on sort order change
2020-03-20 21:15:23 +10:00
Damien Elmes
a004563d19
search order
2020-03-20 21:15:23 +10:00
Damien Elmes
13f726fe8f
fix is:new/is:review
2020-03-20 21:15:23 +10:00
Damien Elmes
46cd7f23f5
added needs to use milliseconds
2020-03-20 21:15:23 +10:00
Damien Elmes
089e059951
tolerate some string IDs
2020-03-20 21:15:23 +10:00
Damien Elmes
1e21fa325b
handle empty searches and leading/trailing whitespace
2020-03-20 21:15:23 +10:00
Damien Elmes
61391a760c
add remaining tests and fix some clippy lints
2020-03-20 21:15:23 +10:00
Damien Elmes
ed009e4fbb
fix rated and state searches
2020-03-20 21:15:23 +10:00
Damien Elmes
986f6c4437
fix tags, more tests
2020-03-20 21:15:23 +10:00
Damien Elmes
274e0ef315
fix cards
2020-03-20 21:15:23 +10:00
Damien Elmes
c3c56d7cf2
fix decks
2020-03-20 21:15:23 +10:00
Damien Elmes
518836e434
fix added
2020-03-20 21:15:23 +10:00
Damien Elmes
3fb5066152
fix qualified search
2020-03-20 21:15:23 +10:00
Damien Elmes
ac8534f4ee
fix escape handling, and handle sql wildcards
2020-03-20 21:15:23 +10:00
Damien Elmes
8f38ad8aa2
avoid extra sql binding in unqualified search
2020-03-20 21:15:23 +10:00
Damien Elmes
b087ebc845
start on search tests
2020-03-20 21:15:23 +10:00
Damien Elmes
f36857ae27
prototype of integration
...
no ordering yet, and no tests
2020-03-20 21:15:23 +10:00
Damien Elmes
6c469a96eb
finish the remaining searches
...
Searches that require multiple deck or note type lookups won't perform
very well at the moment - it either needs caching or to be split up
at the DB level.
Nothing tested yet.
2020-03-20 21:15:23 +10:00
Damien Elmes
a85646bb05
ctx->req
2020-03-20 21:15:23 +10:00
Damien Elmes
3227fc1b9b
add timing to search
2020-03-20 21:15:23 +10:00
Damien Elmes
4f1c85bf8a
add v1 and v2 legacy timing code
2020-03-20 21:15:23 +10:00
Damien Elmes
1b2ebfcf6f
deck searching
...
A bit more complicated than it needs to be, as we don't have the
full deck manager infrastructure yet.
2020-03-20 21:15:23 +10:00
Damien Elmes
91270251bf
address some clippy lints
2020-03-20 21:15:23 +10:00
Damien Elmes
490e2b3cd3
move html stripping out of field_checksum into caller
2020-03-20 21:15:23 +10:00