From 3dd0e0ff24cc1b814c444c4f1611d827acfa44e2 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 2 Mar 2018 16:06:09 -0800 Subject: [PATCH] Updated curl commands for ES6 [skip ci] --- lib/searchkick/logging.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/searchkick/logging.rb b/lib/searchkick/logging.rb index f870604..9e22454 100644 --- a/lib/searchkick/logging.rb +++ b/lib/searchkick/logging.rb @@ -167,7 +167,7 @@ module Searchkick # no easy way to tell which host the client will use host = Searchkick.client.transport.hosts.first - debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map { |t| CGI.escape(t) }.join(',')}" : ''}/_search?pretty -d '#{payload[:query][:body].to_json}'" + debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/#{CGI.escape(index)}#{type ? "/#{type.map { |t| CGI.escape(t) }.join(',')}" : ''}/_search?pretty -H 'Content-Type: application/json' -d '#{payload[:query][:body].to_json}'" end def request(event) @@ -189,7 +189,7 @@ module Searchkick # no easy way to tell which host the client will use host = Searchkick.client.transport.hosts.first - debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/_msearch?pretty -d '#{payload[:body]}'" + debug " #{color(name, YELLOW, true)} curl #{host[:protocol]}://#{host[:host]}:#{host[:port]}/_msearch?pretty -H 'Content-Type: application/json' -d '#{payload[:body]}'" end end -- libgit2 0.21.0