Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Fix test.

Kishore Nallandcfb540b056d
diff --git a/test/collection_specific_more_test.cpp b/test/collection_specific_more_test.cpp
index 57769205..f5960c58 100644
--- a/test/collection_specific_more_test.cpp
+++ b/test/collection_specific_more_test.cpp
@@ -1772,12 +1772,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) {