blob: ff8cb40b5ea5f2acfe8ed37a1dd8e8f23316eebd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
module Kkuleomi::Store
def self.create_index(_force = false)
repositories = [
CategoryRepository,
PackageRepository,
VersionRepository,
ChangeRepository,
UseflagRepository,
CommitRepository
]
settings = JSON.parse('{ "mapping": { "total_fields": { "limit": 50000 } } }')
# In ES 1.5, we could use 1 mega-index. But in ES6, each model needs its own.
repositories.each { |repository|
repository.instance.create_index!(force: _force, settings: settings)
}
end
end
|