From 41548976c0b17cba9a232343a64305ba8bb20a3a Mon Sep 17 00:00:00 2001 From: Harpreet Sangar Date: Tue, 14 Mar 2023 14:47:00 +0530 Subject: [PATCH] Update error message. --- src/index.cpp | 4 ++-- test/collection_join_test.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 Index::do_filtering(filter_node_t* const root, reference_filter_result, collection_name); if (!reference_filter_op.ok()) { - return Option(400, "Failed to parse reference filter on `" + a_filter.referenced_collection_name - +"` collection: " + reference_filter_op.error()); + return Option(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();