anki/pylib/rsbridge
Damien Elmes 59ccfe5918 more search bikeshedding
While implementing the overdue search, I realised it would be nice to
be able to construct a search string with OR and NOT searches without
having to construct each part individually with build_search_string().

Changes:

- Extends SearchTerm to support a text search, which will be parsed
by the backend. This allows us to do things like wrap text in a group
or NOT node.
- Because SearchTerm->Node conversion can now fail with a parsing error,
it's switched over to TryFrom
- Switch concatenate_searches and replace_search_term to use SearchTerms,
so that they too don't require separate string building steps.
- Remove the unused normalize_search()
- Remove negate_search, as this is now an operation on a Node, and
users can wrap their search in SearchTerm(negated=...)
- Remove the match_any and negate args from build_search_string

Having done all this work, I've just realised that perhaps the original
JSON idea was more feasible than I first thought - if we wrote it out
to a string and re-parsed it, we would be able to leverage the existing
checks that occur at parsing stage.
2021-02-11 17:11:17 +10:00
..
cargo update Rust deps 2021-02-03 20:29:48 +10:00
.gitignore rspy -> pylib/rsbridge 2020-11-02 15:21:12 +10:00
BUILD.bazel switch to workspace for Rust code 2020-11-24 18:41:03 +10:00
build.rs rspy -> pylib/rsbridge 2020-11-02 15:21:12 +10:00
Cargo.toml update to stable pyo3 0.13 release 2020-12-23 10:08:38 +10:00
lib.rs more search bikeshedding 2021-02-11 17:11:17 +10:00