Commit 0d27efe0dac63d0f45d5c93f737ac831da791cf9

Authored by Andrew Kane
1 parent 8f3b21c9

Updated readme

Showing 1 changed file with 12 additions and 6 deletions   Show diff stats
@@ -37,12 +37,10 @@ Product.search "Butter", fields: [:name, :brand] @@ -37,12 +37,10 @@ Product.search "Butter", fields: [:name, :brand]
37 ### Query Like SQL 37 ### Query Like SQL
38 38
39 ```ruby 39 ```ruby
40 -Product.search "2% Milk", where: {in_stock: true}, limit: 10, offset: 50, order: {name: :desc} 40 +Product.search "2% Milk", where: {in_stock: true}, limit: 10, offset: 50
41 ``` 41 ```
42 42
43 -The default order is most relevant first, which is `{_score: :desc}`.  
44 -  
45 -Additional operators 43 +#### Where
46 44
47 ```ruby 45 ```ruby
48 where: { 46 where: {
@@ -57,10 +55,18 @@ where: { @@ -57,10 +55,18 @@ where: {
57 } 55 }
58 ``` 56 ```
59 57
60 -Explain 58 +#### Order
  59 +
  60 +```ruby
  61 +order: {name: :desc}
  62 +```
  63 +
  64 +The default order is most relevant first, which is `{_score: :desc}`.
  65 +
  66 +#### Explain
61 67
62 ```ruby 68 ```ruby
63 -Product.search "1% Milk", explain: true 69 +explain: true
64 ``` 70 ```
65 71
66 ### Facets 72 ### Facets