Sha256: 73a342ec339ffb10785c9b08a9689c0bc0b3c9761cff6b21f5f9bef3fb4d9144

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require "kithe"

traject_logger = ActiveSupport::Logger.new("#{Rails.root}/log/traject.log")

Kithe.indexable_settings.solr_url = ENV["SOLR_URL"]

# Index to solr with solr `id` field being our friendlier_id
Kithe.indexable_settings.solr_id_value_attribute = :friendlier_id

# Traject settings
Kithe.indexable_settings.writer_settings.merge!({
  "solr_writer.thread_pool" => 0,
  "solr_writer.batch_size" => 1,
  "solr_writer.solr_update_args" => {softCommit: true},
  "solr_writer.http_timeout" => 3,
  "solr_writer.max_skipped" => -1,
  "logger" => traject_logger
})

# Traject with Basic Auth support
if ENV["SOLR_BASIC_AUTH_USER"].present?
  Kithe.indexable_settings.writer_settings.merge!({
    "solr_writer.basic_auth_user" => ENV["SOLR_BASIC_AUTH_USER"],
    "solr_writer.basic_auth_password" => ENV["SOLR_BASIC_AUTH_PASSWORD"],
    "solr_writer.thread_pool" => 0,
    "solr_writer.batch_size" => 1,
    "solr_writer.solr_update_args" => {softCommit: true}, "solr_writer.http_timeout" => 3,
    "solr_writer.max_skipped" => -1,
    "logger" => traject_logger
  })
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geoblacklight_admin-0.4.1 lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb
geoblacklight_admin-0.4.0 lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb
geoblacklight_admin-0.3.2 lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb
geoblacklight_admin-0.3.1 lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb
geoblacklight_admin-0.3.0 lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb
geoblacklight_admin-0.2.1 lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb