lib/mongoid/elasticsearch/es.rb in mongoid-elasticsearch-0.9.1 vs lib/mongoid/elasticsearch/es.rb in mongoid-elasticsearch-0.10.0
- old
+ new
@@ -56,10 +56,10 @@
query[:size] = ( per_page.to_i ) if per_page
query[:from] = ( page.to_i <= 1 ? 0 : (per_page.to_i * (page.to_i-1)) ) if page && per_page
options[:wrapper] ||= klass.es_wrapper
- Response.new(client, query.merge(custom_type_options(options)), false, klass, options)
+ Response.new(client, query.merge(custom_type_options(options)), false, options[:scope] || klass, options)
end
def all(options = {})
search({body: {query: {match_all: {}}}}, options)
end