lib/mongoid/elasticsearch/es.rb in mongoid-elasticsearch-0.3.1 vs lib/mongoid/elasticsearch/es.rb in mongoid-elasticsearch-0.3.2

- old
+ new

@@ -21,10 +21,9 @@ if query.is_a?(String) query = {q: Utils.clean(query)} end page = options[:page] - options[:per_page] ||= 50 per_page = options[:per_page] 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