From 0718e86f074c362485bad6c3916f318aa1fa570b Mon Sep 17 00:00:00 2001 From: Joerg Reichert Date: Sat, 26 Mar 2016 13:33:27 +0100 Subject: [PATCH] added mapping for attribute published_at to fix sorting by date. Note this requires rebuilding the elasticsearch index --- app/models/paper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/paper.rb b/app/models/paper.rb index d84fb51..77ab1d3 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -27,6 +27,7 @@ class Paper < ActiveRecord::Base indexes :content, type: :string, analyzer: "german" indexes :resolution, type: :string, analyzer: "german" indexes :paper_type, type: :string, index: :not_analyzed + indexes :published_at, type: :date, index: :not_analyzed indexes :originator, type: :string, index: :not_analyzed end end