test/test_helper.rb in searchkick-1.1.2 vs test/test_helper.rb in searchkick-1.2.0
- old
+ new
@@ -71,10 +71,11 @@
field :price, type: Integer
field :color
field :latitude, type: BigDecimal
field :longitude, type: BigDecimal
field :description
+ field :alt_description
end
class Store
include Mongoid::Document
has_many :products
@@ -112,10 +113,11 @@
field :price, type: Integer
field :color, type: String
field :latitude
field :longitude
field :description, type: String
+ field :alt_description, type: String
belongs_to :store, validates: false
end
class Store
@@ -162,10 +164,11 @@
t.integer :price
t.string :color
t.decimal :latitude, precision: 10, scale: 7
t.decimal :longitude, precision: 10, scale: 7
t.text :description
+ t.text :alt_description
t.timestamps null: true
end
ActiveRecord::Migration.create_table :stores do |t|
t.string :name
@@ -217,9 +220,10 @@
word_middle: [:name],
word_end: [:name],
highlight: [:name],
# unsearchable: [:description],
searchable: [:name, :color],
+ only_analyzed: [:alt_description],
match: ENV["MATCH"] ? ENV["MATCH"].to_sym : nil
attr_accessor :conversions, :user_ids, :aisle
def search_data