Class: Valkyrie::Persistence::Solr::Queries::DefaultPaginator

Inherits:
Object
  • Object
show all
Defined in:
lib/valkyrie/persistence/solr/queries/default_paginator.rb

Overview

Acts as a null object representing the default case for paginating over solr results. Often only used for the first iteration of a loop, or to retrieve all Documents in an index.

Instance Method Summary collapse

Instance Method Details

#has_next?Boolean

Default state for the whether or not additional pages of search results in a Solr query response exist



24
25
26
# File 'lib/valkyrie/persistence/solr/queries/default_paginator.rb', line 24

def has_next?
  true
end

#next_pageInteger

Default parameter for the next page in search results in a Solr query request



10
11
12
# File 'lib/valkyrie/persistence/solr/queries/default_paginator.rb', line 10

def next_page
  1
end

#per_pageInteger

Default parameter for the number of documents in a page of search results in a Solr query request



17
18
19
# File 'lib/valkyrie/persistence/solr/queries/default_paginator.rb', line 17

def per_page
  100
end