diff --git a/include/zim/search.h b/include/zim/search.h index ae4c54627..61bf7623d 100644 --- a/include/zim/search.h +++ b/include/zim/search.h @@ -167,10 +167,10 @@ class Search * * @param start The begining of the range to get * (offset of the first result). - * @param end The end of the range to get - * (offset of the result past the end of the range). + * @param maxResults The maximum number of results to return + * (offset of last result from the start of range). */ - const SearchResultSet getResults(int start, int end) const; + const SearchResultSet getResults(int start, int maxResults) const; /** Get the number of estimated results for this search. * diff --git a/src/search.cpp b/src/search.cpp index 7049bbe94..461a15472 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -357,10 +357,10 @@ int Search::getEstimatedMatches() const } } -const SearchResultSet Search::getResults(int start, int end) const { +const SearchResultSet Search::getResults(int start, int maxResults) const { try { auto enquire = getEnquire(); - auto mset = enquire.get_mset(start, end); + auto mset = enquire.get_mset(start, maxResults); return SearchResultSet(mp_internalDb, std::move(mset)); } catch(Xapian::QueryParserError& e) { return SearchResultSet(mp_internalDb);