分片默认为5
This commit is contained in:
parent
3b56e40730
commit
b2bca65025
|
@ -43,7 +43,7 @@ class Attachment < ActiveRecord::Base
|
|||
#elasticsearch kaminari init
|
||||
Kaminari::Hooks.init
|
||||
Elasticsearch::Model::Response::Response.__send__ :include, Elasticsearch::Model::Response::Pagination::Kaminari
|
||||
settings index: { number_of_shards: 1 } do
|
||||
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'
|
||||
|
|
|
@ -12,7 +12,7 @@ class Course < ActiveRecord::Base
|
|||
#elasticsearch kaminari init
|
||||
Kaminari::Hooks.init
|
||||
Elasticsearch::Model::Response::Response.__send__ :include, Elasticsearch::Model::Response::Pagination::Kaminari
|
||||
settings index: { number_of_shards: 1 } do
|
||||
settings index: { number_of_shards: 5 } do
|
||||
mappings dynamic: 'false' do
|
||||
indexes :name, analyzer: 'smartcn',index_options: 'offsets'
|
||||
indexes :description, analyzer: 'smartcn',index_options: 'offsets'
|
||||
|
|
|
@ -35,7 +35,7 @@ class Project < ActiveRecord::Base
|
|||
#elasticsearch kaminari init
|
||||
Kaminari::Hooks.init
|
||||
Elasticsearch::Model::Response::Response.__send__ :include, Elasticsearch::Model::Response::Pagination::Kaminari
|
||||
settings index: { number_of_shards: 1 } do
|
||||
settings index: { number_of_shards: 5 } do
|
||||
mappings dynamic: 'false' do
|
||||
indexes :name, analyzer: 'smartcn',index_options: 'offsets'
|
||||
indexes :description, analyzer: 'smartcn',index_options: 'offsets'
|
||||
|
|
|
@ -30,7 +30,7 @@ class User < Principal
|
|||
#elasticsearch kaminari init
|
||||
Kaminari::Hooks.init
|
||||
Elasticsearch::Model::Response::Response.__send__ :include, Elasticsearch::Model::Response::Pagination::Kaminari
|
||||
settings index: { number_of_shards: 1 } do
|
||||
settings index: { number_of_shards: 5 } do
|
||||
mappings dynamic: 'false' do
|
||||
indexes :login, analyzer: 'smartcn',index_options: 'offsets'
|
||||
indexes :firstname, analyzer: 'smartcn',index_options: 'offsets'
|
||||
|
|
Loading…
Reference in New Issue