Module: Searchkick::SearchkickWithInstrumentation

Defined in:
lib/searchkick/logging.rb

Instance Method Summary collapse

Instance Method Details

#multi_search(searches) ⇒ Object



132
133
134
135
136
137
138
139
140
# File 'lib/searchkick/logging.rb', line 132

def multi_search(searches)
  event = {
    name: "Multi Search",
    body: searches.flat_map { |q| [q.params.except(:body).to_json, q.body.to_json] }.map { |v| "#{v}\n" }.join
  }
  ActiveSupport::Notifications.instrument("multi_search.searchkick", event) do
    super
  end
end