Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Jan 4, 2023
1 parent 2703c24 commit ce881db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ fn tokenizer(s: &str) -> Vec<Cow<str>> {
// We have to provide extraction functions for the fields we want to index

// Title
fn title_extract(d: &Doc) -> Option<&str> {
Some(d.title.as_str())
fn title_extract(d: &Doc) -> Vec<&str> {
vec![d.title.as_str()]
}

// Description
fn description_extract(d: &Doc) -> Option<&str> {
Some(d.description.as_str())
fn description_extract(d: &Doc) -> Vec<&str> {
vec![d.description.as_str()]
}

// Create index with 2 fields
Expand Down

0 comments on commit ce881db

Please sign in to comment.