added mapping for attribute published_at to fix sorting by date. Note this requires rebuilding the elasticsearch index

This commit is contained in:
Joerg Reichert 2016-03-26 13:33:27 +01:00
parent 1734b8bfd6
commit 0718e86f07

View file

@ -27,6 +27,7 @@ class Paper < ActiveRecord::Base
indexes :content, type: :string, analyzer: "german" indexes :content, type: :string, analyzer: "german"
indexes :resolution, type: :string, analyzer: "german" indexes :resolution, type: :string, analyzer: "german"
indexes :paper_type, type: :string, index: :not_analyzed indexes :paper_type, type: :string, index: :not_analyzed
indexes :published_at, type: :date, index: :not_analyzed
indexes :originator, type: :string, index: :not_analyzed indexes :originator, type: :string, index: :not_analyzed
end end
end end