Merge pull request #938 from happy-san/v0.25

Update error message.
This commit is contained in:
Kishore Nallan 2023-03-16 18:17:59 +05:30 committed by GitHub
commit 9ac4b52d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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();