mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Support for partial queries in catalog search
The search text in the catalog query is interpreted as partial by default, but partial query mode can be disabled in C++. The latter possibility is not exposed via the /catalog/search kiwix-serve endpoint, though.
This commit is contained in:
committed by
Matthieu Gautier
parent
47c67a4202
commit
09233bf4f3
@ -59,6 +59,7 @@ class Filter {
|
||||
std::string _creator;
|
||||
size_t _maxSize;
|
||||
std::string _query;
|
||||
bool _queryIsPartial;
|
||||
std::string _name;
|
||||
|
||||
public:
|
||||
@ -103,11 +104,12 @@ class Filter {
|
||||
Filter& publisher(std::string publisher);
|
||||
Filter& creator(std::string creator);
|
||||
Filter& maxSize(size_t size);
|
||||
Filter& query(std::string query);
|
||||
Filter& query(std::string query, bool partial=true);
|
||||
Filter& name(std::string name);
|
||||
|
||||
bool hasQuery() const;
|
||||
const std::string& getQuery() const { return _query; }
|
||||
bool queryIsPartial() const { return _queryIsPartial; }
|
||||
|
||||
bool accept(const Book& book) const;
|
||||
bool acceptByQueryOnly(const Book& book) const;
|
||||
|
Reference in New Issue
Block a user