Commit 599c1d5fac678f85dae18fd7e82fb4b0965dae11

Authored by Andrew Kane
1 parent 5fcb7e5c

Updated readme for conversions_term [skip ci]

Showing 2 changed files with 8 additions and 2 deletions   Show diff stats
1 ## 2.3.1 [unreleased] 1 ## 2.3.1 [unreleased]
2 2
  3 +- Added `conversions_term` option
3 - Added support for passing fields to `suggest` option 4 - Added support for passing fields to `suggest` option
4 - Fixed `page_view_entries` for Kaminari 5 - Fixed `page_view_entries` for Kaminari
5 6
@@ -1563,6 +1563,12 @@ class Product < ActiveRecord::Base @@ -1563,6 +1563,12 @@ class Product < ActiveRecord::Base
1563 end 1563 end
1564 ``` 1564 ```
1565 1565
  1566 +Use a different term for boosting by conversions [master]
  1567 +
  1568 +```ruby
  1569 +Product.search("banana", conversions_term: "organic banana")
  1570 +```
  1571 +
1566 Multiple conversion fields 1572 Multiple conversion fields
1567 1573
1568 ```ruby 1574 ```ruby
@@ -1587,10 +1593,9 @@ end @@ -1587,10 +1593,9 @@ end
1587 and during query time: 1593 and during query time:
1588 1594
1589 ```ruby 1595 ```ruby
1590 -Product.search("banana") # boost by both fields (default) and term (banana) will be used for both matching and boosting. 1596 +Product.search("banana") # boost by both fields (default)
1591 Product.search("banana", conversions: "total_conversions") # only boost by total_conversions 1597 Product.search("banana", conversions: "total_conversions") # only boost by total_conversions
1592 Product.search("banana", conversions: false) # no conversion boosting 1598 Product.search("banana", conversions: false) # no conversion boosting
1593 -Product.search("banana", conversions: "total_conversions", conversions_term: "organic banana") # Match banana but boost by organic banana  
1594 ``` 1599 ```
1595 1600
1596 Change timeout 1601 Change timeout