#

In 

# :typesense_rails


:typesense is a paginator designed for Typesense::Rails results.

# Configuration

Ensure Typesense.configuration[:pagination_backend] == nil.

Model
extend Pagy::Search
Controller
# Get the collection in one of the following ways
search = Article.pagy_search(params[:q], to_query)
# Paginate it
@pagy, @response = pagy(:typesense_rails, search, **options)
Controller
# Standard results (already paginated)
@results = Model.search(params[:q], to_query, { per_page: 10, page: 10, ...})
# Get the pagy object out of it
@pagy    = pagy(:typesense_rails, @results, **options)
  • search_method: :my_search
    • Customize the name of the search method (default :search)

See also Offset Options

See Offset Readers