class documentation

A SearchResultSet contains the SearchResults of a search as well as some result metadata like the amount of matches.

The main purpose of this class is to provide an efficient search that may automatically fetch more results.

Method __init__ The default constructor.
Method __iter__ Iterate over the search results in this set.
Method __len__ Return an estimated amount of results.
Method iter_in_range Iterate over the search results in this set.
Instance Variable n_estimated estimated number of results if available
Instance Variable search the search object that produced this search result
Instance Variable term the used search term
def __init__(self, search, term, n_estimated):

The default constructor.

Parameters
search:BaseSearchthe search object that produced this search result
term:strthe used search term
n_estimated:int or Noneestimated number of results if available
def __iter__(self):

Iterate over the search results in this set.

Returns
SearchResultan interator/generator yielding the search results
def __len__(self):

Return an estimated amount of results.

Returns
intthe estimated amount of results of the search
def iter_in_range(self, start, n=20):

Iterate over the search results in this set.

Parameters
start:intstart (1-based index) of the results to find
n:intnumber of results to fetch
Returns
SearchResultan interator/generator yielding the search results
n_estimated: int or None =

estimated number of results if available

search: BaseSearch =

the search object that produced this search result

term: str =

the used search term