diff --git a/README.md b/README.md index 07e49ce..bb59ae4 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Search made easy -## Usage - Searchkick provides sensible search defaults out of the box. It handles: - stemming - `tomatoes` matches `tomato` @@ -12,6 +10,8 @@ Searchkick provides sensible search defaults out of the box. It handles: - misspellings - `zuchini` matches `zucchini` - custom synonyms - `qtip` matches `cotton swab` +## Usage + ```ruby class Book < ActiveRecord::Base searchkick :name @@ -24,7 +24,15 @@ And to query, use: Book.search("Nobody Listens to Andrew") ``` -**Note:** We recommend reindexing when changing synonyms for best results. +### Synonyms + +```ruby +class Book < ActiveRecord::Base + searchkick :name, synonyms: ["scallion => green onion"] # TODO Ruby syntax +end +``` + +You must call `Book.reindex` after changing synonyms. ### Make Searches Better Over Time -- libgit2 0.21.0