take(count)

Fetches a specific number of search results.

If count is not specified, all results are returned.

Params

  • count (Number) – maximum number of search results to be returned.

Returns

Array<Obj> – An array of Obj instances matching the search criteria. If count is given, the length of the array is less than or equal to count.

Examples

Perform a full-text search for “easy”, limiting the result set to 20 CMS objects:

Fetch the latest three blog posts:

Since take() returns an array, there is no need to use the spread operator:

See also

first, toArray