Class: SolrResults

SolrResults()

A collection of SolrResult models that represent a list of search results from the DataONE query service.

Constructor

new SolrResults()

Source:

Extends

  • Backbone.Collection

Members

type :string

The name of this type of collection.
Type:
  • string
Since:
  • 2.25.0
Default Value:
  • "SolrResults"
Source:

Methods

getCurrentPage() → {number}

Calculates and returns the current page of results that was just fetched
Since:
  • 2.22.0
Source:
Returns:
Type
number

getEnd() → {number}

Calculates the index number of the last search result. E.g. the first page of results may be 0-24, where 24 is the end.
Since:
  • 2.22.0
Source:
Returns:
Type
number

getLastQuery() → {string}

Returns the last query that was fetched.
Source:
Returns:
Type
string

getLastUrl() → {string}

Gets and returns the URL string that was sent during the last fetch.
Since:
  • 2.22.0
Source:
Returns:
Type
string

getNumFound() → {number|undefined}

Returns the total number of results that were just fetched, or undefined if nothing has been fetched yet
Since:
  • 2.22.0
Source:
Returns:
Type
number | undefined

getNumPages() → {number}

Calculates and returns the total pages of results that was just fetched
Since:
  • 2.22.0
Source:
Returns:
Type
number

getPIDs() → {Array.<string>}

Get the list of PIDs for the search results
Since:
  • 2.25.0
Source:
Returns:
- The list of PID strings for the search results
Type
Array.<string>

getRows() → {number}

Returns the number of search result rows
Since:
  • 2.22.0
Source:
Returns:
Type
number

getStart() → {number}

Returns the index number of the first search result E.g. the first page of results may be 0-24, where 0 is the start.
Since:
  • 2.22.0
Source:
Returns:
Type
number

hasChanged() → {boolean}

Determines whether the search parameters have changed since the last fetch. Returns true the next URL to be sent in a fetch() is different at all from the last url that was fetched.
Since:
  • 2.22.0
Source:
Returns:
Type
boolean

nextpage()

Fetches the next page of results
Source:

prevpage()

Fetches the previous page of results
Source:

toPage(page)

Fetches the given page of results
Parameters:
Name Type Description
page number
Source: