Commit cf141ca2056ab61e5769959058a7d3af46a3cb67

Authored by Andrew Kane
1 parent 3a08814c

Added ability to view response

Showing 2 changed files with 7 additions and 0 deletions   Show diff stats
@@ -589,6 +589,12 @@ query.body[:query] = {match_all: {}} @@ -589,6 +589,12 @@ query.body[:query] = {match_all: {}}
589 products = query.execute 589 products = query.execute
590 ``` 590 ```
591 591
  592 +View the response with:
  593 +
  594 +```ruby
  595 +products.response
  596 +```
  597 +
592 ## Reference 598 ## Reference
593 599
594 Searchkick requires Elasticsearch `0.90.0` or higher. 600 Searchkick requires Elasticsearch `0.90.0` or higher.
lib/searchkick/results.rb
1 module Searchkick 1 module Searchkick
2 class Results < Tire::Results::Collection 2 class Results < Tire::Results::Collection
  3 + attr_reader :response
3 4
4 def suggestions 5 def suggestions
5 if @response["suggest"] 6 if @response["suggest"]