Deprecate `SearchRenderer` creation from a `Searcher`.

This commit is contained in:
Matthieu Gautier 2022-01-12 18:14:39 +01:00
parent 3d64a9d9a9
commit e5d26a4699
1 changed files with 16 additions and 4 deletions

View File

@ -35,12 +35,24 @@ class SearchRenderer
{ {
public: public:
/** /**
* The default constructor. * Construct a SearchRenderer from a Searcher.
* *
* @param humanReadableName The global zim's humanReadableName. * This method is now deprecated. Construct the renderer from a
* Used to generate pagination links. * `zim::SearchResultSet`
*
* @param searcher The `Searcher` to render.
* @param mapper The `NameMapper` to use to do the rendering.
*/
DEPRECATED SearchRenderer(Searcher* searcher, NameMapper* mapper);
/**
* Construct a SearchRenderer from a SearchResultSet.
*
* @param srs The `SearchResultSet` to render.
* @param mapper The `NameMapper` to use to do the rendering.
* @param start The start offset used for the srs.
* @param estimatedResultCount The estimatedResultCount of the whole search
*/ */
SearchRenderer(Searcher* searcher, NameMapper* mapper);
SearchRenderer(zim::SearchResultSet srs, NameMapper* mapper, SearchRenderer(zim::SearchResultSet srs, NameMapper* mapper,
unsigned int start, unsigned int estimatedResultCount); unsigned int start, unsigned int estimatedResultCount);