diff --git a/.gitignore b/.gitignore index 259402c..c8f0524 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ Cargo.lock **/*.rs.bk >>>>>>> 5b80c372faafec53fa73cd79d3c44af6183c5d5e >>>>>>> 0724576... Inital commit. -/mutants.out/ \ No newline at end of file +/mutants.out/ +/fuzz \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 362b0b3..1688b52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "indicium" -version = "0.6.2" +version = "0.6.3" authors = ["Dylan Bowker "] edition = "2021" categories = [ "database-implementations" ] @@ -26,7 +26,7 @@ strsim = [ "dep:strsim" ] [dependencies] ahash = { version = "0.8", optional = true } eddie = { version = "0.4", optional = true } -gxhash = { version = "3.1", optional = true } +gxhash = { version = "3.4", optional = true } kstring = "2.0" serde = { version = "1.0", features = [ "derive" ], optional = true } strsim = { version = "0.11", optional = true } diff --git a/src/lib.rs b/src/lib.rs index 7e50a29..e3fdded 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,11 +13,11 @@ //! # What's New? //! //! * Release notes are available on -//! [GitHub](https://github.com/leontoeides/indicium/releases). +//! [GitHub](https://github.com/leontoeides/indicium/releases). //! //! * The full [change -//! log](https://github.com/leontoeides/indicium/blob/master/CHANGELOG.md) is -//! available on GitHub. +//! log](https://github.com/leontoeides/indicium/blob/master/CHANGELOG.md) is +//! available on GitHub. //! //! # Quick Start Guide //! diff --git a/src/simple/builder.rs b/src/simple/builder.rs index 086f292..03abc27 100644 --- a/src/simple/builder.rs +++ b/src/simple/builder.rs @@ -166,17 +166,17 @@ impl SearchIndexBuilder { /// | 3 | Pseudopseudohypoparathyroidism | 0 | | /// /// * In example **1**, since the length is set to `2`, the user's keyword - /// will only be fuzzy matched against keywords in the search index that - /// begin with `su`. + /// will only be fuzzy matched against keywords in the search index that + /// begin with `su`. /// /// * In example **2**, since the length is set to `4`, the user's keyword - /// will only be fuzzy matched against keywords in the search index that - /// begin with `anti`. + /// will only be fuzzy matched against keywords in the search index that + /// begin with `anti`. /// /// * In example **3**, since the length is set to `0`, the user's keyword - /// will be fuzzy matched against every keyword in the search index. This is - /// OK (or even desirable) if the search index is small, however, this will - /// be crippling slow on very large search indicies. + /// will be fuzzy matched against every keyword in the search index. This + /// is OK (or even desirable) if the search index is small, however, this + /// will be crippling slow on very large search indicies. /// /// **Default:** `3` characters #[cfg(any(feature = "eddie", feature = "strsim"))] diff --git a/src/simple/indexable.rs b/src/simple/indexable.rs index 9eb3311..ef24d13 100644 --- a/src/simple/indexable.rs +++ b/src/simple/indexable.rs @@ -30,14 +30,14 @@ /// ``` /// /// * Note: Don't forget that you may make numbers, numeric identifiers, enums, -/// and other types in your `struct` (or other complex types) indexable by -/// converting them to a `String` and including them in the returned -/// `Vec`. +/// and other types in your `struct` (or other complex types) indexable by +/// converting them to a `String` and including them in the returned +/// `Vec`. /// /// * Note: Any type that implements `ToString` (and consequently any type that -/// implements `Display`) to, in turn, gets the `Indexable` implementation for -/// free. This includes Rust primitives like `String`, `u8`, `u16`, `u32`, -/// `u64`, `i8`, `i16`, `i32`, `i64` and so on... +/// implements `Display`) to, in turn, gets the `Indexable` implementation for +/// free. This includes Rust primitives like `String`, `u8`, `u16`, `u32`, +/// `u64`, `i8`, `i16`, `i32`, `i64` and so on... /// /// #### Pro-Tip: Hash Tags /// diff --git a/src/simple/internal/strsim/autocomplete/context_damerau_levenshtein.rs b/src/simple/internal/strsim/autocomplete/context_damerau_levenshtein.rs index cad746c..4a7f8fc 100644 --- a/src/simple/internal/strsim/autocomplete/context_damerau_levenshtein.rs +++ b/src/simple/internal/strsim/autocomplete/context_damerau_levenshtein.rs @@ -18,15 +18,15 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... /// /// * `key_set` limits which keywords to compare the user's keyword - /// against. For a search index keyword to be considered as a fuzzy match, - /// it must contain at least one key that is in this key set. This is how - /// fuzzy matching is made contextual. + /// against. For a search index keyword to be considered as a fuzzy match, + /// it must contain at least one key that is in this key set. This is how + /// fuzzy matching is made contextual. // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/context_jaro.rs b/src/simple/internal/strsim/autocomplete/context_jaro.rs index 7022abb..af7397a 100644 --- a/src/simple/internal/strsim/autocomplete/context_jaro.rs +++ b/src/simple/internal/strsim/autocomplete/context_jaro.rs @@ -18,15 +18,15 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... /// /// * `key_set` limits which keywords to compare the user's keyword - /// against. For a search index keyword to be considered as a fuzzy match, - /// it must contain at least one key that is in this key set. This is how - /// fuzzy matching is made contextual. + /// against. For a search index keyword to be considered as a fuzzy match, + /// it must contain at least one key that is in this key set. This is how + /// fuzzy matching is made contextual. // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/context_jaro_winkler.rs b/src/simple/internal/strsim/autocomplete/context_jaro_winkler.rs index ce936fa..2ed6510 100644 --- a/src/simple/internal/strsim/autocomplete/context_jaro_winkler.rs +++ b/src/simple/internal/strsim/autocomplete/context_jaro_winkler.rs @@ -18,15 +18,15 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... /// /// * `key_set` limits which keywords to compare the user's keyword - /// against. For a search index keyword to be considered as a fuzzy match, - /// it must contain at least one key that is in this key set. This is how - /// fuzzy matching is made contextual. + /// against. For a search index keyword to be considered as a fuzzy match, + /// it must contain at least one key that is in this key set. This is how + /// fuzzy matching is made contextual. // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/context_levenshtein.rs b/src/simple/internal/strsim/autocomplete/context_levenshtein.rs index a4e73b5..d92a351 100644 --- a/src/simple/internal/strsim/autocomplete/context_levenshtein.rs +++ b/src/simple/internal/strsim/autocomplete/context_levenshtein.rs @@ -18,15 +18,15 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... /// /// * `key_set` limits which keywords to compare the user's keyword - /// against. For a search index keyword to be considered as a fuzzy match, - /// it must contain at least one key that is in this key set. This is how - /// fuzzy matching is made contextual. + /// against. For a search index keyword to be considered as a fuzzy match, + /// it must contain at least one key that is in this key set. This is how + /// fuzzy matching is made contextual. // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs b/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs index 47ca2c6..717b0bf 100644 --- a/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs +++ b/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs @@ -18,15 +18,15 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... /// /// * `key_set` limits which keywords to compare the user's keyword - /// against. For a search index keyword to be considered as a fuzzy match, - /// it must contain at least one key that is in this key set. This is how - /// fuzzy matching is made contextual. + /// against. For a search index keyword to be considered as a fuzzy match, + /// it must contain at least one key that is in this key set. This is how + /// fuzzy matching is made contextual. // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs b/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs index adb4c9c..178d2d4 100644 --- a/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs +++ b/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs @@ -18,10 +18,10 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/global_jaro.rs b/src/simple/internal/strsim/autocomplete/global_jaro.rs index a84c9b9..11d3dfa 100644 --- a/src/simple/internal/strsim/autocomplete/global_jaro.rs +++ b/src/simple/internal/strsim/autocomplete/global_jaro.rs @@ -18,10 +18,10 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs b/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs index e7bb0cb..8564059 100644 --- a/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs +++ b/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs @@ -18,10 +18,10 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/global_levenshtein.rs b/src/simple/internal/strsim/autocomplete/global_levenshtein.rs index e8463ed..02e484b 100644 --- a/src/simple/internal/strsim/autocomplete/global_levenshtein.rs +++ b/src/simple/internal/strsim/autocomplete/global_levenshtein.rs @@ -18,10 +18,10 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs b/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs index 9f79ea2..782d6f1 100644 --- a/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs +++ b/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs @@ -18,10 +18,10 @@ impl SearchIndex { /// find the best match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_autocomplete_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/keyword/global_jaro.rs b/src/simple/internal/strsim/keyword/global_jaro.rs index 4d9853b..6a9cd7b 100644 --- a/src/simple/internal/strsim/keyword/global_jaro.rs +++ b/src/simple/internal/strsim/keyword/global_jaro.rs @@ -16,10 +16,10 @@ impl SearchIndex { /// match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_keyword_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/keyword/global_jaro_winkler.rs b/src/simple/internal/strsim/keyword/global_jaro_winkler.rs index 4d1e64f..15e3a69 100644 --- a/src/simple/internal/strsim/keyword/global_jaro_winkler.rs +++ b/src/simple/internal/strsim/keyword/global_jaro_winkler.rs @@ -16,10 +16,10 @@ impl SearchIndex { /// match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_keyword_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/keyword/global_levenshtein.rs b/src/simple/internal/strsim/keyword/global_levenshtein.rs index a4f4bc2..64b6892 100644 --- a/src/simple/internal/strsim/keyword/global_levenshtein.rs +++ b/src/simple/internal/strsim/keyword/global_levenshtein.rs @@ -16,10 +16,10 @@ impl SearchIndex { /// match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_keyword_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more diff --git a/src/simple/internal/strsim/keyword/global_sorensen_dice.rs b/src/simple/internal/strsim/keyword/global_sorensen_dice.rs index c06b62b..2ec2145 100644 --- a/src/simple/internal/strsim/keyword/global_sorensen_dice.rs +++ b/src/simple/internal/strsim/keyword/global_sorensen_dice.rs @@ -16,10 +16,10 @@ impl SearchIndex { /// match for substitution. /// /// * `index_range` limits which keywords to compare the user's keyword - /// against. For example, if the `index_range` is "super" and the user's - /// keyword is "supersonic": only search index keywords beginning with - /// "super" will be compared against the user's keyword: "supersonic" - /// against "superalloy", "supersonic" against "supergiant" and so on... + /// against. For example, if the `index_range` is "super" and the user's + /// keyword is "supersonic": only search index keywords beginning with + /// "super" will be compared against the user's keyword: "supersonic" + /// against "superalloy", "supersonic" against "supergiant" and so on... // // Note: these `strsim_keyword_*` methods are very similar and may seem // repetitive with a lot of boiler plate. These were intentionally made more