From 3cd960ce4a03f18c580307b35acb672f65f38527 Mon Sep 17 00:00:00 2001 From: Fanis Tharropoulos Date: Fri, 20 Feb 2026 16:53:17 +0200 Subject: [PATCH] fix: expose total hits for pagy to use --- lib/typesense-rails.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/typesense-rails.rb b/lib/typesense-rails.rb index 33526d5..f1224fa 100644 --- a/lib/typesense-rails.rb +++ b/lib/typesense-rails.rb @@ -684,6 +684,10 @@ def typesense_facets @typesense_json["facet_counts"] end + def total_hits + @typesense_json["found"] + end + private def typesense_init_raw_answer(json)