module Pagy::ElasticsearchRailsExtra
def total_count(response)
def total_count(response) total = if response.respond_to?(:raw_response) response.raw_response['hits']['total'] else response.response['hits']['total'] end total.is_a?(Hash) ? total['value'] : total end