Commit 442273c1b40254d3129662c8d131788426f36584

Authored by Andrew Kane
1 parent fa2b6106

Updated readme

Showing 1 changed file with 9 additions and 3 deletions   Show diff stats
README.md
... ... @@ -18,7 +18,7 @@ Runs on Elasticsearch
18 18  
19 19 ```ruby
20 20 class Product < ActiveRecord::Base
21   - searchkick :name
  21 + searchkick
22 22 end
23 23 ```
24 24  
... ... @@ -28,11 +28,17 @@ And to query, use:
28 28 Product.search "2% Milk"
29 29 ```
30 30  
  31 +### Query Like SQL
  32 +
  33 +```ruby
  34 +Product.search "2% Milk", where: {in_stock: true}, limit: 10, offset: 50
  35 +```
  36 +
31 37 ### Synonyms
32 38  
33 39 ```ruby
34 40 class Product < ActiveRecord::Base
35   - searchkick :name, synonyms: ["scallion => green onion"] # TODO Ruby syntax
  41 + searchkick synonyms: ["scallion => green onion"] # TODO Ruby syntax
36 42 end
37 43 ```
38 44  
... ... @@ -59,7 +65,7 @@ Add the conversions to the index.
59 65 class Product < ActiveRecord::Base
60 66 has_many :searches
61 67  
62   - searchkick :name, conversions: true
  68 + searchkick conversions: true
63 69  
64 70 def to_indexed_json
65 71 {
... ...