From 2fbad38522fd095ed76a91bdfbded5961fe98d00 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 9 Dec 2015 12:57:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=92=E5=BA=8F=E5=8F=82?= =?UTF-8?q?=E6=95=B0=20=E7=94=A8=E4=BA=8E=E6=8E=92=E5=BA=8F=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=9C=80=E5=A5=BD=E4=B8=8D=E8=A6=81=E5=88=86?= =?UTF-8?q?=E8=AF=8D=20=E4=B8=8D=E7=84=B6=E5=B0=B1=E6=98=AF=E5=A4=9A?= =?UTF-8?q?=E5=80=BC=E5=AD=97=E6=AE=B5=E7=9A=84=E6=8E=92=E5=BA=8F=E4=BC=9A?= =?UTF-8?q?=E6=B5=AA=E8=B4=B9=E5=A4=A7=E9=87=8F=E7=9A=84=E5=86=85=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/attachment.rb | 2 +- app/models/course.rb | 2 +- app/models/memo.rb | 2 +- app/models/project.rb | 2 +- app/models/user.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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