#

In 

# :meilisearch


:meilisearch is a paginator designed for Meilisearch results.

Paginator method for Meilisearch results.

Model
extend Pagy::Search
ActiveRecord_Relation.include Pagy::Meilisearch  
Controller
# Get the collection in one of the following ways
search = Article.pagy_search(params[:q])
search = Article.pagy_search(params[:q]).results
# Paginate it
@pagy, @response = pagy(:meilisearch, search, **options)
Controller
# Standard results (already paginated)
@results = Model.ms_search(nil, hits_per_page: 10, page: 10, **options)
# Get the pagy object out of it
@pagy    = pagy(:meilisearch, @results, **options)
  • search_method: :my_search
    • Allows customization of the search method name (default: :ms_search)

See also Offset Options

See Offset Readers