Commit 8aaaee4a128ea3efbae11e66f015bb4c4a41f864
1 parent
c03e3490
Exists in
master
and in
19 other branches
Document default_fields option [skip ci]
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
README.md
@@ -1650,6 +1650,14 @@ Eager load different associations by model | @@ -1650,6 +1650,14 @@ Eager load different associations by model | ||
1650 | Searchkick.search("*", index_name: [Product, Store], model_includes: {Product => [:store], Store => [:product]}) | 1650 | Searchkick.search("*", index_name: [Product, Store], model_includes: {Product => [:store], Store => [:product]}) |
1651 | ``` | 1651 | ``` |
1652 | 1652 | ||
1653 | +Specify default fields to search | ||
1654 | + | ||
1655 | +```ruby | ||
1656 | +class Product < ActiveRecord::Base | ||
1657 | + searchkick default_fields: [:name] | ||
1658 | +end | ||
1659 | +``` | ||
1660 | + | ||
1653 | Turn off special characters | 1661 | Turn off special characters |
1654 | 1662 | ||
1655 | ```ruby | 1663 | ```ruby |