Skip to content

fix: expose total hits for pagy to use#18

Closed
tharropoulos wants to merge 1 commit intotypesense:masterfrom
tharropoulos:total-hits
Closed

fix: expose total hits for pagy to use#18
tharropoulos wants to merge 1 commit intotypesense:masterfrom
tharropoulos:total-hits

Conversation

@tharropoulos
Copy link
Contributor

Change Summary

Pagy's typesense paginator relies on total_hits, which isn't exposed without a pagination backend, but that pagination backend shouldn't be defined for #17 's usecase.

PR Checklist

@typesense_json["facet_counts"]
end

def total_hits
Copy link
Member

@jasonbosco jasonbosco Feb 20, 2026

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
Contributor 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants