Commit 90935ff8bd31445bbac116134cf05b6e734c553e
1 parent
f960b357
Exists in
master
and in
21 other branches
Updated docs for match option
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
README.md
... | ... | @@ -220,11 +220,15 @@ By default, results must match the entire word - `back` will not match `backpack |
220 | 220 | |
221 | 221 | ```ruby |
222 | 222 | class Product < ActiveRecord::Base |
223 | - searchkick match: :word_start | |
223 | + searchkick word_start: [:name] | |
224 | 224 | end |
225 | 225 | ``` |
226 | 226 | |
227 | -And reindex. | |
227 | +And to search (after you reindex): | |
228 | + | |
229 | +```ruby | |
230 | +Product.search "back", fields: [:name], match: :word_start | |
231 | +``` | |
228 | 232 | |
229 | 233 | Available options are: |
230 | 234 | ... | ... |