blob: 9640a87219420e1328d4ef96ab8caf3f11326a26 (
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: true, settings: settings)
}
end
end
|