Anki/rslib/src/search
RumovZ 872b6df22a
Optimise searching in (all) fields (#1622)
* Avoid rebuilding regex in field search

* Special case search in all fields

* Don't repeat mid nodes in field search sql

Small speed gain for searches like `*:re:foo` and reduces the sql tree
depth if a lot of field names of the same notetype match.

* Add sql function to match fields with regex

* Optimise used field search algorithm

- Searching in all fields is a special case.
- Using native SQL comparison is preferred.
- For Regex, use newly added SQL function.

* Please clippy

* Avoid pyramid of doom

* nt_fields -> matched_fields

* Add tests for regex and all field searches

* minor tweaks for readability (dae)
2022-01-24 20:30:08 +10:00
..
builder.rs Remove into_node_list() (#1609) 2022-01-21 21:23:52 +10:00
card_mod_order.sql Add card mod column for notes mode 2021-04-08 20:14:10 +02:00
deck_order.sql reformat .sql files 2021-01-09 14:08:55 +10:00
mod.rs Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
note_cards_order.sql squash merge browser refactor 2021-03-29 16:14:54 +10:00
note_decks_order.sql Add deck column for notes mode 2021-04-08 19:46:06 +02:00
note_due_order.sql Add note due column 2021-03-30 21:39:15 +02:00
note_ease_order.sql squash merge browser refactor 2021-03-29 16:14:54 +10:00
note_interval_order.sql Add note interval column 2021-03-30 23:44:35 +02:00
note_lapses_order.sql Add note lapses column 2021-03-29 16:06:15 +02:00
note_reps_order.sql Add note reps column 2021-03-29 15:52:02 +02:00
notetype_order.sql reformat .sql files 2021-01-09 14:08:55 +10:00
parser.rs Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
sqlwriter.rs Optimise searching in (all) fields (#1622) 2022-01-24 20:30:08 +10:00
template_order.sql reformat .sql files 2021-01-09 14:08:55 +10:00
writer.rs Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00