Skip to content

Commit

Permalink
chore: update to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
leontoeides committed Oct 19, 2024
1 parent b51892f commit 59233e4
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 109 deletions.
199 changes: 120 additions & 79 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,96 +3,137 @@
* Release notes are available on
[GitHub](https://github.com/leontoeides/indicium/releases).

* `0.6.2`: Corrected a [panic on UTF-8
searches](https://github.com/leontoeides/indicium/issues/2).

* `0.6.1`: Removed `eddie` as the default string similarity crate, for now, due
to a potential `panic`.

* `0.6.0`: Fix for contextual fuzzy matching for `Live` interactive searches.
In some cases `Live` search would return global results without properly
observing the `maximum_search_results` setting. This has been fixed. This will
improve performance and user experience.

* `0.6.0`: New, optional `eddie` feature which is turned on by default. When
this feature is enabled, this library will utilize
[Ilia Schelokov](https://github.com/thaumant)'s [eddie](https://lib.rs/crates/eddie)
crate for [faster](https://github.com/thaumant/eddie/blob/master/benchmarks.md)
UTF-8 string distance and string similarity calculations.

* `0.6.0`: New, optional `gxhash` feature. `ahash` is still the default hasher.
When this feature is enabled, this library will utilize
[Olivier Giniaux](https://github.com/ogxd)'s bleeding edge
[gxhash](https://lib.rs/crates/gxhash) crate for faster `HashMap` and `HashSet`
hashing.

* `0.5.2`: New, optional `ahash` feature which is turned on by default. When
this feature is enabled, this library will utilize
[Tom Kaitchuck](https://crates.io/users/tkaitchuck)'s [ahash](https://lib.rs/crates/ahash)
crate for faster `HashMap` and `HashSet` hashing rather than the standard
library's SipHash.

* `0.5.1`: Fixes compile failure for the experimental `select2` feature and when
not using `fuzzy` feature.

* `0.5.0`: The `simple` search index now internally employs
[Ed Page](https://github.com/epage)'s [kstring](https://crates.io/crates/kstring)
crate. The `dump_keyword` and `profile` function signatures were changed
slightly, otherwise there's no impact to the caller.

* `0.5.0`: Performance improvements.

* `0.4.2`: Any type that implements
[ToString](https://doc.rust-lang.org/std/string/trait.ToString.html) (and
consequently any type that implements
[Display](https://doc.rust-lang.org/std/fmt/trait.Display.html))
now gets the
[Indexable](https://docs.rs/indicium/latest/indicium/simple/trait.Indexable.html)
implementation for free.

* `0.4.1`: Improved contextual fuzzy matching.

* `0.4.0`: Initial support for fuzzy searching. Fuzzy matching is applied to the
last (partial) keyword in the search string for _autocompletion_ and _live
search_ only. Keywords at the start or in the middle of the user's search string
will not be substituted. Indicium uses [Danny Guo](https://github.com/dguo)'s
[strsim](https://crates.io/crates/strsim) crate for string similarity
calculations.

* `0.4.0`: Breaking changes:
# 0.6.3

* Removed unnecessary `collect`s on some iterators. Thank you for pointing this
out, `clippy`. This should provide a small performance improvement.

# 0.6.2

* Corrected a [panic on UTF-8
searches](https://github.com/leontoeides/indicium/issues/2).

# 0.6.1

* Removed `eddie` as the default string similarity crate, for now, due to a
potential `panic`.

# 0.6.0

* Fix for contextual fuzzy matching for `Live` interactive searches. In some
cases `Live` search would return global results without properly observing the
`maximum_search_results` setting. This has been fixed. This will improve
performance and user experience.

* New, optional `eddie` feature which is turned on by default. When this feature
is enabled, this library will utilize [Ilia Schelokov](https://github.com/thaumant)'s
[eddie](https://lib.rs/crates/eddie) crate for
[faster](https://github.com/thaumant/eddie/blob/master/benchmarks.md)
UTF-8 string distance and string similarity calculations.

* New, optional `gxhash` feature. `ahash` is still the default hasher. When this
feature is enabled, this library will utilize
[Olivier Giniaux](https://github.com/ogxd)'s bleeding edge
[gxhash](https://lib.rs/crates/gxhash) crate for faster `HashMap` and `HashSet`
operations.

# 0.5.2

* New, optional `ahash` feature which is turned on by default. When this feature
is enabled, this library will utilize [Tom Kaitchuck](https://crates.io/users/tkaitchuck)'s
[ahash](https://lib.rs/crates/ahash) crate for faster `HashMap` and `HashSet`
operations rather than using the standard library's SipHash.

# 0.5.1

* Fixes compile failure for the experimental `select2` feature and when not
using `fuzzy` feature.

# 0.5.0

* The `simple` search index now internally employs
[Ed Page](https://github.com/epage)'s [kstring](https://crates.io/crates/kstring)
crate.

* The `dump_keyword` and `profile` function signatures were changed slightly,
otherwise there's no expected impact to callers.

* Performance improvements.

# 0.4.2

* Any type that implements
[ToString](https://doc.rust-lang.org/std/string/trait.ToString.html) (and
consequently any type that implements
[Display](https://doc.rust-lang.org/std/fmt/trait.Display.html))
now gets the
[Indexable](https://docs.rs/indicium/latest/indicium/simple/trait.Indexable.html)
implementation for free.

# 0.4.1

* Improved contextual fuzzy matching.

# 0.4.0

* Initial support for fuzzy searching. Fuzzy matching is applied to the last
(partial) keyword in the search string for _autocompletion_ and _live search_
only.

Keywords at the start or in the middle of the user's search string will not be
substituted. Indicium uses [Danny Guo](https://github.com/dguo)'s
[strsim](https://crates.io/crates/strsim) crate for string similarity
calculations.

* Breaking changes:
* Builder pattern is now passed owned values.
* `K` key type requires `Hash` trait for `fuzzy` string search feature.
* New `SearchIndex` default settings.

* `0.4.0`: **Any dependent software should see if (or how) the updated defaults
change search behaviour and tweak accordingly before adopting the 0.4.0
update.**
* **Any dependent software should see if (or how) the updated defaults change
search behaviour and tweak accordingly before adopting the 0.4.0 update.**

# 0.3.7

* An experimental feature is now disabled by default to reduce resource
consumption.

# 0.3.6

* Implemented `DerefMut` which gives access to the search index's underlying
`BTreeMap`. Implemented the `clear()` method for the seach index which is a
convenience method for clearing the search index.

# 0.3.5

* Peformance improvements.

# 0.3.4

* Peformance improvements.

* `0.3.7`: An experimental feature is now disabled by default to reduce resource
consumption.
# 0.3.3

* `0.3.6`: Implemented `DerefMut` which gives access to the search index's
underlying `BTreeMap`. Implemented `clear()` which is a convenience method for
clearing the search index.
* Fix: `cargo test` failed. Sorry.

* `0.3.5`: Peformance improvements.
# 0.3.2

* `0.3.4`: Peformance improvements.
* Fix: issue with search indexes that do not use keyword splitting.

* `0.3.3`: Fix: `cargo test` failed. Sorry.
# 0.3.1

* `0.3.2`: Fix: issue with search indexes that do not use keyword splitting.
* Autocomplete no longer offers previously used keywords as options.

* `0.3.1`: Autocomplete no longer offers previously used keywords as options.
* Added `maximum_keys_per_keyword` getter method.

* `0.3.1`: Added `maximum_keys_per_keyword` getter method.
* Added `autocomplete_with` and `search_with` methods which allow ad-hoc
overrides of the `AutocompleteType`/`SearchType` and maximum results
parameters.

* `0.3.1`: Added `autocomplete_with` and `search_with` methods which allow
ad-hoc overrides of the `AutocompleteType`/`SearchType` and maximum results
parameters.
# 0.3.0

* `0.3.0`: Added new search type `SearchType::Live` which is for "search as you
type" interfaces. It is sort of a hybrid between `autocomplete` and
`SearchType::And`. It will search using an (incomplete) string and return keys
as the search results. Each resulting key can then be used to retrieve the full
record from its collection to be rendered & displayed to the user.
* Added new search type `SearchType::Live` which is for "search as you type"
interfaces. It is sort of a hybrid between `autocomplete` and
`SearchType::And`. It will search using an (incomplete) string and return keys
as the search results. Each resulting key can then be used to retrieve the
full record from its collection to be rendered & displayed to the user.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
publish = true
readme = "README.md"
repository = "https://github.com/leontoeides/indicium"
rust-version = "1.62.1"
rust-version = "1.73.0"

[features]
default = [ "simple", "dep:strsim", "dep:ahash" ]
Expand Down
50 changes: 21 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# indicium
[![Docs](https://docs.rs/indicium/badge.svg)](https://docs.rs/indicium)
[![Crates.io](https://img.shields.io/crates/v/indicium.svg?maxAge=2592000)](https://crates.io/crates/indicium)
[![msrv](https://img.shields.io/badge/rustc-1.62.1+-red)](https://blog.rust-lang.org/2023/06/01/Rust-1.62.1.html)
![Crates.io Version](https://img.shields.io/crates/v/indicium)
![Crates.io MSRV](https://img.shields.io/crates/msrv/indicium)
![Crates.io License](https://img.shields.io/crates/l/indicium)
![Crates.io Total Downloads](https://img.shields.io/crates/d/indicium)

A simple in-memory search for collections (Vec, HashMap, BTreeMap, etc) and
key-value stores. Features autocompletion.
Expand All @@ -11,7 +12,7 @@ require compiling a separate server binary. I wanted something simple and
light-weight - an easy-to-use crate that could conveniently search structs and
collections within my own binary. So, I made `indicium`.

![alt text](https://www.arkiteq.io/crates/indicium/banner.jpg "Indicium: A Simple In-Memory Search for Rust")
<img src="https://www.arkiteq.io/crates/indicium/banner.jpg" alt="Indicium: A Simple In-Memory Search for Rust" width="400"/>

While `indicium` was made with web apps in mind, it is an in-memory search and
it does not scale indefinitely or to cloud size (i.e. Facebook or Google size).
Expand All @@ -26,7 +27,16 @@ crate is primarily limited by available memory. However, depending on the nature
your data-set and if there are keywords that are repeated many times,
performance may begin to degrade at a point.

# What's New?
# Installation

Configure the dependencies in your project's `Cargo.toml` file:

```toml
[dependencies]
indicium = "0.6"
```

# Release Notes

* Release notes are available on
[GitHub](https://github.com/leontoeides/indicium/releases).
Expand All @@ -35,29 +45,6 @@ performance may begin to degrade at a point.
log](https://github.com/leontoeides/indicium/blob/master/CHANGELOG.md) is
available on GitHub.

* `0.6.2`: Corrected a [panic on UTF-8
searches](https://github.com/leontoeides/indicium/issues/2).

* `0.6.1`: Removed `eddie` as the default string similarity crate, for now, due
to a potential `panic`.

* `0.6.0`: Fix for contextual fuzzy matching for `Live` interactive searches.
In some cases `Live` search would return global results without properly
observing the `maximum_search_results` setting. This has been fixed. This will
improve performance and user experience.

* `0.6.0`: New, optional `eddie` feature which is turned on by default. When
this feature is enabled, this library will utilize
[Ilia Schelokov](https://github.com/thaumant)'s [eddie](https://lib.rs/crates/eddie)
crate for [faster](https://github.com/thaumant/eddie/blob/master/benchmarks.md)
UTF-8 string distance and string similarity calculations.

* `0.6.0`: New, optional `gxhash` feature. `ahash` is still the default hasher.
When this feature is enabled, this library will utilize
[Olivier Giniaux](https://github.com/ogxd)'s bleeding edge
[gxhash](https://lib.rs/crates/gxhash) crate for faster `HashMap` and `HashSet`
hashing.

# Quick Start Guide

For our **Quick Start Guide** example, we will be searching inside of the
Expand Down Expand Up @@ -226,4 +213,9 @@ assert_eq!(
autocomplete_options,
vec!["a very big bird", "a very big birthday"]
);
```
```

# Crate Status

This crate is passively maintained. This crate does what it's expected to do and
does it quite well, in my opinion. Frequent updates are not expected.

0 comments on commit 59233e4

Please sign in to comment.