Permalink
Browse files

Fixing empty query

  • Loading branch information...
1 parent ee54845 commit b9816cfabe934929e740af1e25c4f625fc81c49c @gabriel committed Nov 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/swiftype/document_type.rb
@@ -62,7 +62,8 @@ def suggest(query, options={})
end
def search(query, options={})
- search_params = { :q => query }.merge(parse_search_options(options))
+ search_params = parse_search_options(options)
+ search_params[:q] = query || ""
ResultSet.new(post("engines/#{engine_id}/document_types/#{slug}/search.json", search_params))
end
end

0 comments on commit b9816cf

Please sign in to comment.