Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/typesense-rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@ def typesense_facets
@typesense_json["facet_counts"]
end

def total_hits

@jasonbosco jasonbosco Feb 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tharropoulos Every other method in the AdditionalMethods module has the prefix typesense_, so this method stands out as odd to me... Can we name this typesense_found and then may be create an alias method with an additional name for Pagy to use?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be closed, pagy doesn't rely on this method anymore, using the raw found value from the JSON response

@typesense_json["found"]
end

private

def typesense_init_raw_answer(json)
Expand Down