946eb46813
* Add option to exclude fields from unqualified searches * Use temp tables instead This is slightly faster according to my (very rough) tests. * Make query a bit more readable * exclude_from_search -> excludeFromSearch * Remove superfluous notetypes table from query * Rework to use field search logic Thanks to Rumo for the suggestion: https://github.com/ankitects/anki/pull/2394#issuecomment-1446702402 * Exclude fields from field searches too * Fix error on notetypes with no included fields * Add back the exclude_fields function This approach seems to perform better on average than the previously benchmarked ones. * Use pure-SQL approach to excluding fields * Change single field search to use new approach * Fix flawed any_excluded/sortf_excluded logic * Support field exclusion in the nc operator Also fix search text being wrapped in % in the any_excluded=true case. * Support field exclusion in the re and w operators * Label field exclusion as being slower * Unqualified search should be wrapped in % in all cases I was under the impression that it shouldn't be wrapped with the new field exclusion logic. * Remove unnecessary .collect() * Refactor some complex return types into structs * Do not exclude fields in field searches * Add a test and docstring for CollectRanges * Avoid destructuring in closures * Remove the exclude_fields function Minor wording tweaks by dae: * num_fields -> total_fields_in_note * fields -> field_ranges_to_search * fields -> fields_to_search * SingleField -> FieldQualified * mid -> ntid |
||
---|---|---|
.buildkite | ||
.cargo | ||
.config | ||
.github/ISSUE_TEMPLATE | ||
.vscode.dist | ||
build | ||
cargo | ||
docs | ||
ftl | ||
proto | ||
pylib | ||
python | ||
qt | ||
rslib | ||
sass | ||
tools | ||
ts | ||
.deny.toml | ||
.dprint.json | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.isort.cfg | ||
.mypy.ini | ||
.prettierignore | ||
.prettierrc | ||
.pylintrc | ||
.rustfmt-empty.toml | ||
.rustfmt.toml | ||
.version | ||
Cargo.lock | ||
Cargo.toml | ||
CONTRIBUTORS | ||
LICENSE | ||
ninja | ||
package.json | ||
pkgkey.asc | ||
README.md | ||
run | ||
run.bat | ||
rust-toolchain.toml | ||
SECURITY.md | ||
yarn.lock |
Anki
This repo contains the source code for the computer version of Anki.
If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/
For more information on building, please see Development.