Allow multiple category support

Created a generic function multipleQuery which takes:
1. string (representing a comma separated list)
2. param (the value to query on using Xapian).

Category and language query will use this function.
This commit is contained in:
Nikhil Tanwar
2023-07-23 18:57:42 +05:30
parent 9c91fc7369
commit c938101c70
2 changed files with 25 additions and 14 deletions

View File

@ -105,6 +105,12 @@ class Filter {
Filter& acceptTags(const Tags& tags);
Filter& rejectTags(const Tags& tags);
/**
* Set the filter to only accept books in the specified category.
*
* Multiple categories can be specified as a comma-separated list (in
* which case a book in any of those categories will match).
*/
Filter& category(std::string category);
/**