From 3084537d1ed03625b767ad792a266de0f8c616e1 Mon Sep 17 00:00:00 2001 From: mpostma Date: Wed, 4 Aug 2021 10:33:30 +0200 Subject: [PATCH] restore attributes for faceting in dump v1 --- .../src/index_controller/dump_actor/loaders/v1.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs b/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs index c631e113c..c0c7b8ef2 100644 --- a/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs +++ b/meilisearch-http/src/index_controller/dump_actor/loaders/v1.rs @@ -73,7 +73,7 @@ struct Settings { #[serde(default, deserialize_with = "deserialize_some")] pub synonyms: Option>>>, #[serde(default, deserialize_with = "deserialize_some")] - pub filterable_attributes: Option>>, + pub attributes_for_faceting: Option>>, } fn load_index( @@ -142,7 +142,7 @@ impl From for index_controller::Settings { // representing the name of the faceted field + the type of the field. Since the type // was not known in the V1 of the dump we are just going to assume everything is a // String - filterable_attributes: settings.filterable_attributes.map(|o| o.map(|vec| vec.into_iter().collect())), + filterable_attributes: settings.attributes_for_faceting.map(|o| o.map(|vec| vec.into_iter().collect())), // we need to convert the old `Vec` into a `BTreeSet` ranking_rules: settings.ranking_rules.map(|o| o.map(|vec| vec.into_iter().filter_map(|criterion| { match criterion.as_str() {