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

Update error message.

Harpreet Sangar41548976c0b1
diff --git a/src/index.cpp b/src/index.cpp
index 4133a821..3f0a42db 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1513,8 +1513,8 @@ Option<bool> Index::do_filtering(filter_node_t* const root,
reference_filter_result,
collection_name);
if (!reference_filter_op.ok()) {
- return Option<bool>(400, "Failed to parse reference filter on `" + a_filter.referenced_collection_name
- +"` collection: " + reference_filter_op.error());
+ return Option<bool>(400, "Failed to apply reference filter on `" + a_filter.referenced_collection_name
+ + "` collection: " + reference_filter_op.error());
}
if (context_ids_length != 0) {
diff --git a/test/collection_join_test.cpp b/test/collection_join_test.cpp
index fe1c32fa..7f453b27 100644
--- a/test/collection_join_test.cpp
+++ b/test/collection_join_test.cpp
@@ -395,7 +395,7 @@ TEST_F(CollectionJoinTest, FilterByReference_SingleMatch) {
search_op = coll->search("s", {"product_name"}, "$Customers(foo:=customer_a)", {}, {}, {0},
10, 1, FREQUENCY, {true}, Index::DROP_TOKENS_THRESHOLD);
ASSERT_FALSE(search_op.ok());
- ASSERT_EQ(search_op.error(), "Failed to parse reference filter on `Customers` collection: Could not find a filter field named `foo` in the schema.");
+ ASSERT_EQ(search_op.error(), "Failed to apply reference filter on `Customers` collection: Could not find a filter field named `foo` in the schema.");
auto result = coll->search("s", {"product_name"}, "$Customers(customer_id:=customer_a && product_price:<100)", {}, {}, {0},
10, 1, FREQUENCY, {true}, Index::DROP_TOKENS_THRESHOLD).get();