Damien Elmes
9696e959be
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
51a379de23
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
f0ed34d79b
support regexp search in single field
2020-03-21 13:06:46 +10:00
Damien Elmes
97577dbc16
support wildcard in field*:val search
2020-03-21 12:45:25 +10:00
Damien Elmes
08e64d246d
don't require wildcard for unicode case folding in search
2020-03-21 12:44:56 +10:00
Damien Elmes
4ff17d31b3
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
d1ebdbdcce
support regex searches
2020-03-21 12:00:48 +10:00
Damien Elmes
2dc1b5c982
add regexp() to sqlite
2020-03-21 10:23:11 +10:00
Damien Elmes
2aab44d9ce
support deck:"foo bar" style searches
2020-03-21 09:34:24 +10:00
Damien Elmes
a5787781d7
add note searching
2020-03-21 09:00:05 +10:00
Damien Elmes
aee64016ac
fix formatting and unit test
2020-03-21 08:17:24 +10:00
Damien Elmes
307aadfd8a
don't set deck.sched.today in test
2020-03-21 08:12:32 +10:00
Damien Elmes
daa848bb4d
update tests to reflect what now constitutes an error
2020-03-21 08:12:01 +10:00
Damien Elmes
868c463fb1
tests need to flush before searching
2020-03-21 08:10:52 +10:00
Damien Elmes
3a4146560c
handle escaped tag searches and tag:* special case
2020-03-21 08:09:28 +10:00
Damien Elmes
ad09c89c3c
check for child decks case-insensitively
2020-03-21 07:57:07 +10:00
Damien Elmes
c3314d3689
don't crash when card:0 passed in
2020-03-21 07:56:55 +10:00
Damien Elmes
124357bd82
handle * in single-field search
2020-03-21 07:56:32 +10:00
Damien Elmes
949252d438
fix ease search
2020-03-21 07:56:09 +10:00
Damien Elmes
63ce44aaa7
enable sorting on the extra browser columns
2020-03-21 07:55:53 +10:00
Damien Elmes
5debd3e0f8
add the ability to provide a custom sort order; use backend for find
2020-03-21 07:55:21 +10:00
Damien Elmes
1f8a1126a4
don't require trailing whitespace in .sql files
2020-03-21 07:49:44 +10:00
Damien Elmes
9ee82d55b1
disable word wrap in browser rows
2020-03-20 21:15:23 +10:00
Damien Elmes
13f3719650
ensure endReset() is called even if an exception is raised
2020-03-20 21:15:23 +10:00
Damien Elmes
09a76967e7
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
00d0447ecb
support sorting on note type, card template and decks
2020-03-20 21:15:23 +10:00
Damien Elmes
1318118461
flush config on sort order change
2020-03-20 21:15:23 +10:00
Damien Elmes
2c362d6991
search order
2020-03-20 21:15:23 +10:00
Damien Elmes
d94effcdc7
fix is:new/is:review
2020-03-20 21:15:23 +10:00
Damien Elmes
79697746a4
added needs to use milliseconds
2020-03-20 21:15:23 +10:00
Damien Elmes
c90670ec3a
tolerate some string IDs
2020-03-20 21:15:23 +10:00
Damien Elmes
224bad2566
handle empty searches and leading/trailing whitespace
2020-03-20 21:15:23 +10:00
Damien Elmes
67cb27bada
add remaining tests and fix some clippy lints
2020-03-20 21:15:23 +10:00
Damien Elmes
8c158a3897
fix rated and state searches
2020-03-20 21:15:23 +10:00
Damien Elmes
37ad664afc
fix tags, more tests
2020-03-20 21:15:23 +10:00
Damien Elmes
fa654a0e22
fix cards
2020-03-20 21:15:23 +10:00
Damien Elmes
425a9d04ca
fix decks
2020-03-20 21:15:23 +10:00
Damien Elmes
2693e142aa
fix added
2020-03-20 21:15:23 +10:00
Damien Elmes
5df04b161c
fix qualified search
2020-03-20 21:15:23 +10:00
Damien Elmes
c723adea17
fix escape handling, and handle sql wildcards
2020-03-20 21:15:23 +10:00
Damien Elmes
b70668d31c
avoid extra sql binding in unqualified search
2020-03-20 21:15:23 +10:00
Damien Elmes
1f9e8e388a
start on search tests
2020-03-20 21:15:23 +10:00
Damien Elmes
bca5f2ddff
prototype of integration
...
no ordering yet, and no tests
2020-03-20 21:15:23 +10:00
Damien Elmes
9752de5aaa
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
85af35509d
ctx->req
2020-03-20 21:15:23 +10:00
Damien Elmes
dc12c23ce9
add timing to search
2020-03-20 21:15:23 +10:00
Damien Elmes
2beccd377b
add v1 and v2 legacy timing code
2020-03-20 21:15:23 +10:00
Damien Elmes
9f3cc0982d
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
f559ae3ef8
address some clippy lints
2020-03-20 21:15:23 +10:00
Damien Elmes
cc54e92756
move html stripping out of field_checksum into caller
2020-03-20 21:15:23 +10:00