internal package Foswiki::Search::ResultSet

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

internal package Foswiki::Search::ResultSet is a Foswiki::Iterator

This class implements the ResultSet API - its basically a Sorted Aggregate Iterator for foswiki 1.1
  • NOTE: does not implement the unique function - by its nature, the data is unique, and it would be a non-trivial drain on memory in this context

(due to the partially completed InfoCache removeal)

in future it will probably become more clever.

new(\@list)

Create a new iterator over the given list of iterators. The list is not damaged in any way.

hasNext() -> $boolean

Returns false when the iterator is exhausted.

skip(count) -> $countremaining

skip X elements (returns 0 if successful, or number of elements remaining to skip if there are not enough elements to skip) skip must set up next as though hasNext was called.

next() -> $data

Return the next entry in the list.

nextWeb() -> $data

switch tot he next Web (only works on partition==web, and if we've already started iterating.

sortResults

the implementation of %SORT{"" limit="" order="" reverse="" date=""}%

it should be possible for the search engine to pre-sort, making this a nop, or to delay evaluated, partially evaluated, or even delegated to the DB/SQL

Topic revision: r1 - 21 Nov 2014, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding SedWiki? Send feedback