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:
Veloman Yunkan
2021-03-10 16:18:43 +04:00
committed by Matthieu Gautier
parent 47c67a4202
commit 09233bf4f3
3 changed files with 11 additions and 4 deletions

View File

@ -263,7 +263,7 @@ TEST_F(LibraryTest, filterCheck)
bookIds = lib.filter(kiwix::Filter().query("folklore"));
EXPECT_EQ(bookIds.size(), 1U);
bookIds = lib.filter(kiwix::Filter().query("Wiki*"));
bookIds = lib.filter(kiwix::Filter().query("Wiki"));
EXPECT_EQ(bookIds.size(), 4U);
bookIds = lib.filter(kiwix::Filter().query("Wiki").creator("Wiki"));