From 370a45a58b89c4c029e04fa2b7bb1715fd19b754 Mon Sep 17 00:00:00 2001 From: Irevoire Date: Wed, 23 Nov 2022 13:14:41 +0100 Subject: [PATCH] send the ranking rules as a string because amplitude is too dumb to process an array as a single value --- meilisearch-http/src/routes/indexes/settings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/routes/indexes/settings.rs b/meilisearch-http/src/routes/indexes/settings.rs index 9c3d3b8c3..d2508a3c8 100644 --- a/meilisearch-http/src/routes/indexes/settings.rs +++ b/meilisearch-http/src/routes/indexes/settings.rs @@ -344,7 +344,7 @@ make_setting_route!( "attribute_position": setting.as_ref().map(|rr| rr.iter().position(|s| s == "attribute")), "sort_position": setting.as_ref().map(|rr| rr.iter().position(|s| s == "sort")), "exactness_position": setting.as_ref().map(|rr| rr.iter().position(|s| s == "exactness")), - "values": setting.as_ref().map(|rr| rr.iter().filter(|s| !s.contains(':')).collect::>()), + "values": setting.as_ref().map(|rr| rr.iter().filter(|s| !s.contains(':')).cloned().collect::>().join(", ")), } }), Some(req), @@ -443,7 +443,7 @@ pub async fn update_all( "attribute_position": new_settings.ranking_rules.as_ref().set().map(|rr| rr.iter().position(|s| s == "attribute")), "sort_position": new_settings.ranking_rules.as_ref().set().map(|rr| rr.iter().position(|s| s == "sort")), "exactness_position": new_settings.ranking_rules.as_ref().set().map(|rr| rr.iter().position(|s| s == "exactness")), - "values": new_settings.ranking_rules.as_ref().set().map(|rr| rr.iter().filter(|s| !s.contains(':')).collect::>()), + "values": new_settings.ranking_rules.as_ref().set().map(|rr| rr.iter().filter(|s| !s.contains(':')).cloned().collect::>().join(", ")), }, "searchable_attributes": { "total": new_settings.searchable_attributes.as_ref().set().map(|searchable| searchable.len()),