class documentation
class TitleStartSearch(BaseSearch):
Constructor: TitleStartSearch(*args, search_nonarticles, **kwargs)
A search for finding entries whose titles start with a certain prefix.
This search is case sensitive!
| Method | __init__ |
The default constructor. |
| Method | search |
Perform a search. |
| Method | search |
Perform a range-limited search. |
| Instance Variable | _titlepointerlist |
Undocumented |
Inherited from BaseSearch:
| Method | close |
Perform any necessary cleanup. |
| Instance Variable | zim |
the ZIM archive this search is for |
overrides
pyzim.search.BaseSearch.__init__The default constructor.
All arguments that are not specific for this method will be passed to the superclass.
| Parameters | |
| *args | Undocumented |
searchbool | if nonzero, search all entries and not only the articles. In this case, the search terms must begin with the namespace. |
| **kwargs | Undocumented |
overrides
pyzim.search.BaseSearch.searchPerform a search.
| Parameters | |
term:str | term to search for |
| Returns | |
SearchResultSet | an object containing the search results |
overrides
pyzim.search.BaseSearch.search_in_rangePerform a range-limited search.
This function is primarily a helper function used by SearchResultSet to iteratively fetch new results, but it can still be used independently. Just beware of the different return type.
| Parameters | |
term:str | term to search for |
start:int | start (1-based index) of the results to find |
n:int | number of results to fetch |
| Returns | |
list of SearchResult | an object containing the search results |