aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2018-01-16 23:10:40 -0500
committerAlec Warner <antarus@gentoo.org>2018-01-16 23:10:40 -0500
commitc0dea2c99c7bd5b6edd0ff751822dc75a377c3cf (patch)
treef4c01c9e2f7f9ee72c408966d70c31ac15c5dc20 /config
parentFix typo that broke compilation. (diff)
downloadpackages-5-c0dea2c99c7bd5b6edd0ff751822dc75a377c3cf.tar.gz
packages-5-c0dea2c99c7bd5b6edd0ff751822dc75a377c3cf.tar.bz2
packages-5-c0dea2c99c7bd5b6edd0ff751822dc75a377c3cf.zip
Update ES indexing scheme for ES6.
ES6 introduces a number of breaking changes into ES. 1) https://www.elastic.co/guide/en/elasticsearch/reference/master/removal-of-types.html This basically entails breaking up the single multi-typel index we had into N indices, one per model. Our other option is to continue to use a single index, but add a custom type property. This seemed unwieldy. 2) The 'String' type was also deprecated. See https://www.elastic.co/blog/strings-are-dead-long-live-strings So we see many updates from "not analyzed" to "keyword" to retain the previous behavior
Diffstat (limited to 'config')
-rw-r--r--config/initializers/elasticsearch.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb
index 71a032a..dded1e4 100644
--- a/config/initializers/elasticsearch.rb
+++ b/config/initializers/elasticsearch.rb
@@ -1,10 +1,9 @@
require 'elasticsearch/persistence/model'
Elasticsearch::Persistence.client = Elasticsearch::Client.new host: ENV['ELASTICSEARCH_URL'] || 'elasticsearch:9300'
-
if Rails.env.development?
logger = ActiveSupport::Logger.new(STDERR)
- logger.level = Logger::INFO
+ logger.level = Logger::DEBUG
logger.formatter = proc { |s, d, p, m| "\e[2m#{m}\n\e[0m" }
Elasticsearch::Persistence.client.transport.logger = logger
end