debian-mirror-gitlab/elasticsearch-rails/elasticsearch-model/spec/support/app/series.rb

12 lines
303 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
class Series < ActiveRecord::Base
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
settings index: {number_of_shards: 1, number_of_replicas: 0} do
mapping do
indexes :name, type: 'text', analyzer: 'snowball'
indexes :created_at, type: 'date'
end
end
end