Skip to content

Commit

Permalink
Update to documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
leontoeides committed Sep 23, 2023
1 parent 844c89e commit 47ab5be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,10 @@ preferred method for large collections is to `insert` into the `SearchIndex` as
you insert into your collection (Vec, HashMap, etc.)

It's recommended to wrap your target collection (your `Vec`, `HashMap`, etc.)
and this `SearchIndex` together in a new `struct` type. (This is called the
[Newtype pattern](https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction]).)
Then, implement the `insert`, `replace`, `remove`, etc. methods for this new
`struct` type that will update both the collection and search index. This will
ensure that both your collection and index are always synchronized.
and this `SearchIndex` together in a new `struct` type. Then, implement the
`insert`, `replace`, `remove`, etc. methods for this new `struct` type that will
update both the collection and search index. This will ensure that both your
collection and index are always synchronized.

Once the index has been populated, you can use the `search` and `autocomplete`
methods.
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,8 @@
//! `SearchIndex` as you insert into your collection (Vec, HashMap, etc.)
//!
//! It's recommended to wrap your target collection (your `Vec`, `HashMap`,
//! etc.) and this `SearchIndex` together in a new `struct` type. (This is
//! called the
//! [Newtype pattern](https://doc.rust-lang.org/book/ch19-04-advanced-types.html#using-the-newtype-pattern-for-type-safety-and-abstraction]).)
//! Then, implement the `insert`, `replace`, `remove`, etc. methods for this new
//! etc.) and this `SearchIndex` together in a new `struct` type. Then,
//! implement the `insert`, `replace`, `remove`, etc. methods for this new
//! `struct` type that will update both the collection and search index. This
//! will ensure that both your collection and index are always synchronized.
//!
Expand Down

0 comments on commit 47ab5be

Please sign in to comment.