aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2018-02-04 09:56:05 -0500
committerAlec Warner <antarus@gentoo.org>2018-02-04 09:56:05 -0500
commit3cc5ef94ae18bb0352cc458af377baf8ea2067f6 (patch)
treed7e36245039f441a2a6be969feb55b81dd24cc2e /lib
parentFix find_all_by_package. (diff)
downloadpackages-5-3cc5ef94ae18bb0352cc458af377baf8ea2067f6.tar.gz
packages-5-3cc5ef94ae18bb0352cc458af377baf8ea2067f6.tar.bz2
packages-5-3cc5ef94ae18bb0352cc458af377baf8ea2067f6.zip
Fix bug where field limits were not being raised.
Merge base_settings into settings used to create index.
Diffstat (limited to 'lib')
-rw-r--r--lib/kkuleomi/store.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/kkuleomi/store.rb b/lib/kkuleomi/store.rb
index 853d397..150a64f 100644
--- a/lib/kkuleomi/store.rb
+++ b/lib/kkuleomi/store.rb
@@ -28,19 +28,17 @@ module Kkuleomi::Store
filter: %w(lowercase autocomplete_filter)
}
}
- }
+ },
+ mapping: { total_fields: { limit: 25000 } }
}
-
-
# In ES 1.5, we could use 1 mega-index. But in ES6, each model needs its own.
types.each { |type|
client = type.gateway.client
client.indices.delete(index: type.index_name) rescue nil if force
body = {
- settings: type.settings.to_hash,
- mappings: type.mappings.to_hash,
- index: { "mapping.total_fields.limit" => 25000 },
+ settings: type.settings.to_hash.merge(base_settings),
+ mappings: type.mappings.to_hash
}
client.indices.create(index: type.index_name, body: body)
}