From fae118a46ba23da5aed9f4436e16ba7677ecbb84 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 18 Mar 2022 12:37:27 +0100 Subject: Improve fuzzy search (#279) * Add SearchMode fzf. Add a new search mode "fzf" that tries to mimic the search syntax of https://github.com/junegunn/fzf#search-syntax This search mode splits the query into terms where each term is matched individually. Terms can have operators like prefix, suffix, exact match only and can be inverted. Additionally, smart-case matching is performed: if a term contains a non-lowercase letter the match will be case-sensitive. * PR feedback. - Use SearchMode::Fuzzy instead of SearchMode::Fzf - update docs - re-order tests so previous fuzzy tests come first, add more tests for each operator * PR comments: remove named arguments, match expression * PR comments: macro -> async func --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 01e53383..5ef50935 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,6 +116,7 @@ dependencies = [ "minspan", "parse_duration", "rand 0.8.5", + "regex", "reqwest", "rmp-serde", "rust-crypto", -- cgit v1.3.1