lib/inquisitio/indexer.rb in inquisitio-0.1.3 vs lib/inquisitio/indexer.rb in inquisitio-0.1.4

- old
+ new

@@ -13,12 +13,14 @@ @documents = documents end def index + Inquisitio.config.logger.info "Indexer posting to #{batch_index_url} body: #{body}" response = Excon.post(batch_index_url, :body => body, :headers => {"Content-Type" =>"application/json"}) + Inquisitio.config.logger.info "Response - status: #{response.status} body: #{response.body}" raise InquisitioError.new("Index failed with status code: #{response.status} Message: #{response.body}") unless response.status == 200 response.body end private