aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2018-01-17 18:37:39 -0500
committerAlec Warner <antarus@gentoo.org>2018-01-17 18:37:39 -0500
commitd206dc88cf0d24ac0b8e1df20afb12bcc1b6450e (patch)
tree4415f859f2d8d2073dff580d9815ac44d60115c2 /lib
parentAnother parent relation needed to be removed. (diff)
downloadpackages-5-d206dc88cf0d24ac0b8e1df20afb12bcc1b6450e.tar.gz
packages-5-d206dc88cf0d24ac0b8e1df20afb12bcc1b6450e.tar.bz2
packages-5-d206dc88cf0d24ac0b8e1df20afb12bcc1b6450e.zip
Fix gateway. Allow more fields in indices.
Indexes have field limits now. I'm not sure this is the right fix, but I've expanded it to 25k; hoping to contain the entire tree.
Diffstat (limited to 'lib')
-rw-r--r--lib/kkuleomi/store.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kkuleomi/store.rb b/lib/kkuleomi/store.rb
index 1e3c6fe..23f88f2 100644
--- a/lib/kkuleomi/store.rb
+++ b/lib/kkuleomi/store.rb
@@ -31,11 +31,17 @@ module Kkuleomi::Store
}
}
+
+
# 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 = type.gateway.client
client.indices.delete(type.index_name) rescue nil if force
- body = { settings: type.settings.to_hash, mappings: type.mappings.to_hash }
+ body = {
+ settings: type.settings.to_hash,
+ mappings: type.mappings.to_hash,
+ index: { "mapping.total_fields.limit" => 25000 },
+ }
client.indices.create(index: type.index_name, body: body)
}
end