You are here

public function SearchApiQuery::range in Search API 7

Adds a range of results to return.

This will be saved in the query's options. If called without parameters, this will remove all range restrictions previously set.

Parameters

int|null $offset: The zero-based offset of the first result returned.

int|null $limit: The number of results to return.

Return value

SearchApiQueryInterface The called object.

Overrides SearchApiQueryInterface::range

File

includes/query.inc, line 622
Contains SearchApiQueryInterface and SearchApiQuery.

Class

SearchApiQuery
Provides a standard implementation of the SearchApiQueryInterface.

Code

public function range($offset = NULL, $limit = NULL) {
  $this->options['offset'] = $offset;
  $this->options['limit'] = $limit;
  return $this;
}