mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
Create environment specific index name for papers
This will require re-indexing your development database
This commit is contained in:
parent
8f4342919f
commit
d790e97535
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ class Paper < ActiveRecord::Base
|
|||
validates :published_at, presence: true, parseable_date: true
|
||||
validates :resolution, length: { maximum: 30_000 }
|
||||
|
||||
index_name ['srm', Rails.env, self.base_class.to_s.pluralize.underscore].join('_')
|
||||
|
||||
settings index: { number_of_shards: 1 } do
|
||||
mappings dynamic: false do
|
||||
indexes :name, type: :string, analyzer: "german"
|
||||
|
|
Loading…
Reference in a new issue