RumovZ
baf3dd9dde
For deck searches, unescape quotes only
...
For now, revert to the old handling of deck names using text_to_re from
text.rs and have parser.rs only unescape quotes.
2020-11-14 19:06:37 +01:00
RumovZ
c27175238c
Fix 'escaped' parser for empty string
...
Fix a bug where 'escaped' parsers (nom) accepted the empty
string by wrapping them in 'verify' parsers.
2020-11-14 18:28:24 +01:00
RumovZ
e09486d088
Fix bugs and inconsistencies in the search parser
2020-11-12 17:27:50 +01:00
Damien Elmes
791894d2d0
fix new clippy lints
2020-10-09 21:35:53 +10:00
Damien Elmes
61bbe6a604
fix * handling in unqualifed text as well
...
https://forums.ankiweb.net/t/anki-2-1-desktop-searching-with-only-when-limited-to-a-field/3789/4
2020-09-29 21:18:19 +10:00
Damien Elmes
2e7c71b415
fix escaping of * in field search
...
mentioned in
https://github.com/ankitects/anki/pull/769
2020-09-27 16:04:08 +10:00
Damien Elmes
4d66bafc51
stop is:due gathering learning cards that are not due yet
...
https://forums.ankiweb.net/t/how-to-avoid-rebuilding-filtered-decks-to-skip-learning-cards-steps/3551/
2020-09-21 11:41:54 +10:00
Damien Elmes
f32d773e25
set_deck()
2020-09-03 17:42:46 +10:00
Damien Elmes
f7d4bf8489
support did:[deck id] search
2020-09-03 16:43:22 +10:00
Damien Elmes
7c169daa95
move card sorting and resetting to backend
2020-09-03 15:54:15 +10:00
Damien Elmes
396081d329
move filtered deck empty/fill to backend
...
emptying of individual card ids still to be done
2020-09-02 17:56:23 +10:00
Damien Elmes
988b3c00c1
move unbury/unsuspend routines into backend
2020-09-01 10:24:38 +10:00
Damien Elmes
4894025cfc
add separate sched/user bury searches, and fix bury enums
2020-09-01 10:24:38 +10:00
Damien Elmes
b9f6bde2dc
catch leading/trailing boolean operators
...
https://forums.ankiweb.net/t/is-it-only-me-anki-giving-corrupt-collection-error/2424/20
2020-08-27 09:59:29 +10:00
Damien Elmes
cb821a9e3c
fix globs not working in bulk tag add/remove
2020-08-17 18:14:00 +10:00
Damien Elmes
3da7884e19
reject double comma in id list
...
https://forums.ankiweb.net/t/anki-2-1-29-and-below-2-small-bugs/1496
2020-07-29 13:05:34 +10:00
Damien Elmes
d35bc85ead
is:review should include relearning cards
...
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/36
This issue appears to have existed since the V2 scheduler was
introduced - the old Python search code was ignoring Relearn as well.
2020-07-09 11:07:50 +10:00
Damien Elmes
8cfafdbc32
supported edited:n
...
https://forums.ankiweb.net/t/feature-request-advanced-broswer-search-by-edited/268
2020-07-01 10:17:57 +10:00
Damien Elmes
06d9f64dea
lint fixes
2020-06-29 15:53:56 +10:00
Damien Elmes
4be8e7923a
fix partially quoted text not handling escaped quotes
...
https://forums.ankiweb.net/t/how-to-search-for-cards-containing-quotes/500/10
2020-06-29 15:48:01 +10:00
Damien Elmes
4d88b6521d
cards added graph
2020-06-29 15:48:01 +10:00
Damien Elmes
1e9901e9bd
experiment with exposing raw card/revlog data to frontend
2020-06-29 15:48:00 +10:00
Damien Elmes
6d7be475e6
catch invalid regex in search
...
https://github.com/ankitects/anki/pull/652
2020-06-09 11:46:07 +10:00
Damien Elmes
c78e8425aa
automatically omit notes or cards table when possible
2020-05-19 11:27:02 +10:00
Damien Elmes
c77bc74a2b
rename SortMode arg to match enum
2020-05-12 21:13:34 +10:00
Damien Elmes
0a87b1ef2c
support disabling unicode normalization in notes
2020-05-12 21:13:34 +10:00
Damien Elmes
7ef72aba04
use the backend for the deck due tree
...
- approx 3x faster on a large test deck
- counts are no longer capped to 1000 in the tree
2020-05-12 21:13:33 +10:00
Damien Elmes
46e0469991
rework aux table sorting
...
Instead of inserting text into the aux table and sorting on the fly
(which does a binary sort), we insert the ids in unicase-sorted order,
and then sort based on the automatically assigned rowids - giving
us faster sorts, and proper unicase folding.
2020-05-12 21:13:33 +10:00
Damien Elmes
c727a9e3f1
fix case sensitivity of notetype/template searches
2020-05-12 21:13:33 +10:00
Damien Elmes
c9db36bc82
update searching code to use decks table
2020-05-12 21:13:33 +10:00
Damien Elmes
24ef0cc6f1
add separate decks table, and start on moving deck handling to Rust
...
The Python tests are passing, but there are still a number of issues
to work through, and the table/protobuf schema is not yet finalized.
2020-05-12 21:13:33 +10:00
Damien Elmes
d810ba5db9
template changes and card generation
...
Cloze cards are not yet supported, missing decks are not handled,
and more testing is still required.
2020-05-12 21:13:33 +10:00
Damien Elmes
0c8763edf3
cache notetypes
2020-05-12 21:13:33 +10:00
Damien Elmes
6e554e6585
add separate search_notes_only()
2020-05-12 21:13:33 +10:00
Damien Elmes
cbb76290c2
start work on field changes, and add search_cards to col
2020-05-12 21:13:33 +10:00
Damien Elmes
638e69af91
move note db code to storage
2020-05-12 21:13:33 +10:00
Damien Elmes
91767fc87b
native struct for NoteField
...
ord is made optional so we can keep track of changes in the future
2020-05-12 21:13:33 +10:00
Damien Elmes
9c41210cf4
use native struct for NoteType
2020-05-12 21:13:33 +10:00
Damien Elmes
96300f5858
migrate the schema11 usages to new structs/sql queries
2020-05-12 21:13:33 +10:00
Damien Elmes
4b39a8b727
move schema11 note type code into separate file
2020-05-12 21:13:33 +10:00
Damien Elmes
475478cec5
split note types into separate tables
...
- store the config in protobuf instead of json
- still loading+saving in bulk for now
- code using the schema11 structs needs to be migrated
2020-05-12 21:13:33 +10:00
Damien Elmes
36ac3244c2
fix a unit test
2020-05-08 17:27:41 +10:00
Damien Elmes
a1e7690f35
fix dupe search with included formatting
...
https://anki.tenderapp.com/discussions/ankidesktop/41286-2125-doesnt-show-duplicates
2020-05-08 15:26:45 +10:00
Damien Elmes
811bcda14c
support globbing chars inside word boundary search
2020-04-25 09:43:08 +10:00
Damien Elmes
2f8396a951
add w: shortcut for searching on word boundaries
2020-04-25 08:48:01 +10:00
Damien Elmes
0538d9b764
(de)serialize decks in backend
2020-04-09 12:41:59 +10:00
Damien Elmes
bca49bd054
load/save note types in backend
...
This allows us to normalize bad data, and is the first step towards
splitting note types into separate tables.
2020-04-08 10:05:07 +10:00
Damien Elmes
b5022ad354
store config in separate DB table
...
- mtime is tracked on each key individually, which will allow
merging of config changes when syncing in the future
- added col.(get|set|remove)_config()
- in order to support existing code that was mutating returned
values (eg col.conf["something"]["another"] = 5), the returned list/dict
will be automatically wrapped so that when the value is dropped, it
will save the mutated item back to the DB if it's changed. Code that
is fetching lists/dicts from the config like so:
col.conf["foo"]["bar"] = baz
col.setMod()
will continue to work in most case, but should be gradually updated to:
conf = col.get_config("foo")
conf["bar"] = baz
col.set_config("foo", conf)
2020-04-06 15:39:47 +10:00
Damien Elmes
9bce844df7
fix duplicates search
2020-04-04 17:38:35 +10:00
Damien Elmes
ac54f85840
update tag handling
...
- tag list stored in a separate DB table
- non-wildcard searches now do full unicode case folding
(eg tag:masse matches 'Maße')
- wildcard matches do simple unicode case folding
- some functions haven't been updated yet, so ascii folding will
continue to be used in some operations
2020-04-03 19:34:46 +10:00