Fix test.

This commit is contained in:
Kishore Nallan 2023-01-26 19:33:47 +05:30
parent e8e1772858
commit 08ae11cf1f

View File

@ -1859,12 +1859,13 @@ TEST_F(CollectionSpecificMoreTest, SearchCutoffTest) {
ASSERT_TRUE(coll1->add(doc.dump()).ok());
}
auto res = coll1->search("1 2", {"title"}, "", {}, {}, {0}, 3, 1, FREQUENCY, {false}, 5,
spp::sparse_hash_set<std::string>(),
spp::sparse_hash_set<std::string>(), 10, "", 30, 4, "title", 20, {}, {}, {}, 0,
"<mark>", "</mark>", {}, 1000, true, false, true, "", false, 1).get();
auto coll_op = coll1->search("1 2", {"title"}, "", {}, {}, {0}, 3, 1, FREQUENCY, {false}, 5,
spp::sparse_hash_set<std::string>(),
spp::sparse_hash_set<std::string>(), 10, "", 30, 4, "title", 20, {}, {}, {}, 0,
"<mark>", "</mark>", {}, 1000, true, false, true, "", false, 1);
ASSERT_TRUE(res["search_cutoff"].get<bool>());
ASSERT_FALSE(coll_op.ok());
ASSERT_EQ("Site is overloaded", coll_op.error());
}
TEST_F(CollectionSpecificMoreTest, CrossFieldTypoAndPrefixWithWeights) {