Skip to content

Commit a46bda3

Browse files
soartec-labestolfo
authored andcommitted
Update search.rb example code (#593)
update example code
1 parent 54bc0dc commit a46bda3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/elasticsearch/dsl/search.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@ module Search
3232
# match title: 'test'
3333
# end
3434
# end
35+
# definition.to_hash
36+
# => {:query=>{:match=>{:title=>"test"}}}
3537
#
3638
# @example Using the class imperatively
3739
#
3840
# definition = Search.new
39-
# query = Query.new
41+
# query = Queries::Match.new title: 'test'
4042
# definition.query query
4143
# definition.to_hash
42-
# # => => {:query=>{:match=>{:title=>"Test"}}}
44+
# # => {:query=>{:match=>{:title=>"test"}}}
4345
#
4446
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html
4547
#

0 commit comments

Comments
 (0)