diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 999cefdaa..8d4a1a524 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -46,7 +46,7 @@ class Attachment < ActiveRecord::Base settings index: { number_of_shards: 5 } do mappings dynamic: 'false' do indexes :filename, analyzer: 'smartcn',index_options: 'offsets' - indexes :downloads, analyzer: 'smartcn',index_options: 'offsets' + indexes :downloads, index:"not_analyzed",index_options: 'offsets' end end diff --git a/app/models/course.rb b/app/models/course.rb index 30a6bb439..8647b82df 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -16,7 +16,7 @@ class Course < ActiveRecord::Base mappings dynamic: 'false' do indexes :name, analyzer: 'smartcn',index_options: 'offsets' indexes :description, analyzer: 'smartcn',index_options: 'offsets' - indexes :updated_at, analyzer: 'smartcn',index_options: 'offsets',type:"date" + indexes :updated_at, index:"not_analyzed",type:"date" end end diff --git a/app/models/memo.rb b/app/models/memo.rb index 5d590e228..2ead1cbb6 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -22,7 +22,7 @@ class Memo < ActiveRecord::Base mappings dynamic: 'false' do indexes :subject, analyzer: 'smartcn',index_options: 'offsets' indexes :content, analyzer: 'smartcn',index_options: 'offsets' - indexes :updated_at, type:'date' + indexes :updated_at,index:"not_analyzed" ,type:'date' end end diff --git a/app/models/project.rb b/app/models/project.rb index ff546e098..6495dbe26 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -39,7 +39,7 @@ class Project < ActiveRecord::Base mappings dynamic: 'false' do indexes :name, analyzer: 'smartcn',index_options: 'offsets' indexes :description, analyzer: 'smartcn',index_options: 'offsets' - indexes :updated_on, analyzer: 'smartcn',index_options: 'offsets', type:'date' + indexes :updated_on, index:"not_analyzed", type:'date' end end diff --git a/app/models/user.rb b/app/models/user.rb index 9c437a186..17b66a43d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -35,7 +35,7 @@ class User < Principal indexes :login, analyzer: 'smartcn',index_options: 'offsets' indexes :firstname, analyzer: 'smartcn',index_options: 'offsets' indexes :lastname, analyzer: 'smartcn',index_options: 'offsets' - indexes :last_login_on, analyzer: 'smartcn',index_options: 'offsets',type: 'date' + indexes :last_login_on, index:"not_analyzed",type: 'date' end end