Commit d2a89c65b8b73a31e35727886cc1ec6fd2f6646e

Authored by Andrew
1 parent 999dcd99

Fixed conversions test [skip ci]

Showing 2 changed files with 4 additions and 4 deletions   Show diff stats
README.md
... ... @@ -565,7 +565,7 @@ Searchkick can use conversion data to learn what users are looking for. If a use
565 565  
566 566 The first step is to define your conversion metric and start tracking conversions. The database works well for low volume, but feel free to use Redis or another datastore.
567 567  
568   -You do **not** need to clean up the search queries. Searchkick automatically treats `apple` and `APPLES` the same.
  568 +Searchkick automatically treats `apple` and `APPLE` the same.
569 569  
570 570 Next, add conversions to the index.
571 571  
... ... @@ -573,7 +573,7 @@ Next, add conversions to the index.
573 573 class Product < ApplicationRecord
574 574 has_many :searches, class_name: "Searchjoy::Search", as: :convertable
575 575  
576   - searchkick conversions: ["conversions"] # name of field
  576 + searchkick conversions: [:conversions] # name of field
577 577  
578 578 def search_data
579 579 {
... ...
test/boost_test.rb
... ... @@ -40,9 +40,9 @@ class BoostTest &lt; Minitest::Test
40 40 assert_order "speaker", ["Speaker D", "Speaker C", "Speaker B", "Speaker A"], {conversions: "conversions_a", conversions_term: "speaker_1"}, Speaker
41 41 end
42 42  
43   - def test_conversions_stemmed
  43 + def test_conversions_case
44 44 store [
45   - {name: "Tomato A", conversions: {"tomato" => 1, "tomatos" => 1, "Tomatoes" => 1}},
  45 + {name: "Tomato A", conversions: {"tomato" => 1, "TOMATO" => 1, "tOmAtO" => 1}},
46 46 {name: "Tomato B", conversions: {"tomato" => 2}}
47 47 ]
48 48 assert_order "tomato", ["Tomato A", "Tomato B"]
... ...