lib/elastics/scope/query_methods.rb in elastics-scopes-1.2.1 vs lib/elastics/scope/query_methods.rb in elastics-scopes-1.3.0
- old
+ new
@@ -75,10 +75,10 @@
#
def count(*vars)
result = if vars.first.is_a?(Symbol)
template = vars.shift
# preserves an eventual wrapper by calling the template method
- self[:context].send(template, params(:search_type => 'count'), *vars)
+ self[:context].send(template, params(:size => 0), *vars)
else
Query.elastics.count_search(:get, self, *vars)
end
result['hits']['total']
end