From a46bda3a5f3d8b407327d14426d49c4cc2ba489b Mon Sep 17 00:00:00 2001 From: Shodai Suzuki Date: Tue, 15 Jan 2019 20:32:23 +0900 Subject: [PATCH] Update search.rb example code (#593) update example code --- lib/elasticsearch/dsl/search.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/elasticsearch/dsl/search.rb b/lib/elasticsearch/dsl/search.rb index d06c1dc..63a57af 100644 --- a/lib/elasticsearch/dsl/search.rb +++ b/lib/elasticsearch/dsl/search.rb @@ -32,14 +32,16 @@ module Search # match title: 'test' # end # end + # definition.to_hash + # => {:query=>{:match=>{:title=>"test"}}} # # @example Using the class imperatively # # definition = Search.new - # query = Query.new + # query = Queries::Match.new title: 'test' # definition.query query # definition.to_hash - # # => => {:query=>{:match=>{:title=>"Test"}}} + # # => {:query=>{:match=>{:title=>"test"}}} # # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html #