Sha256: 9de3ef6082ccb4c099ccc3b6ad80dc096ddde206f14de3c083ef59a2979f0bf5

Contents?: true

Size: 336 Bytes

Versions: 3

Compression:

Stored size: 336 Bytes

Contents

class ::ArticleForPagination < ActiveRecord::Base
  include Elasticsearch::Model

  scope :published, -> { where(published: true) }

  settings index: { number_of_shards: 1, number_of_replicas: 0 } do
    mapping do
      indexes :title,      type: 'text', analyzer: 'snowball'
      indexes :created_at, type: 'date'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
elasticsearch-model-6.1.2 spec/support/app/article_for_pagination.rb
elasticsearch-model-6.1.1 spec/support/app/article_for_pagination.rb
elasticsearch-model-6.1.0 spec/support/app/article_for_pagination.rb