diff --git a/meilisearch-core/src/settings.rs b/meilisearch-core/src/settings.rs index 456b9fead..50ac9c92c 100644 --- a/meilisearch-core/src/settings.rs +++ b/meilisearch-core/src/settings.rs @@ -1,4 +1,4 @@ -use std::collections::{BTreeMap, BTreeSet, HashSet}; +use std::collections::{BTreeMap, BTreeSet}; use std::str::FromStr; use std::iter::IntoIterator; @@ -23,7 +23,7 @@ pub struct Settings { #[serde(default, deserialize_with = "deserialize_some")] pub searchable_attributes: Option>>, #[serde(default, deserialize_with = "deserialize_some")] - pub displayed_attributes: Option>>, + pub displayed_attributes: Option>>, #[serde(default, deserialize_with = "deserialize_some")] pub stop_words: Option>>, #[serde(default, deserialize_with = "deserialize_some")] @@ -161,7 +161,7 @@ pub struct SettingsUpdate { pub distinct_attribute: UpdateState, pub primary_key: UpdateState, pub searchable_attributes: UpdateState>, - pub displayed_attributes: UpdateState>, + pub displayed_attributes: UpdateState>, pub stop_words: UpdateState>, pub synonyms: UpdateState>>, pub attributes_for_faceting: UpdateState>, diff --git a/meilisearch-http/src/routes/setting.rs b/meilisearch-http/src/routes/setting.rs index 8de584c67..ae5fe1f75 100644 --- a/meilisearch-http/src/routes/setting.rs +++ b/meilisearch-http/src/routes/setting.rs @@ -2,7 +2,7 @@ use actix_web::{web, HttpResponse}; use actix_web_macros::{delete, get, post}; use meilisearch_core::settings::{Settings, SettingsUpdate, UpdateState, DEFAULT_RANKING_RULES}; use meilisearch_schema::Schema; -use std::collections::{BTreeMap, BTreeSet, HashSet}; +use std::collections::{BTreeMap, BTreeSet}; use crate::error::{Error, ResponseError}; use crate::helpers::Authentication; @@ -390,7 +390,7 @@ async fn get_displayed( async fn update_displayed( data: web::Data, path: web::Path, - body: web::Json>>, + body: web::Json>>, ) -> Result { let index = data .db @@ -524,7 +524,7 @@ fn get_indexed_attributes(schema: &Schema) -> Vec { } } -fn get_displayed_attributes(schema: &Schema) -> HashSet { +fn get_displayed_attributes(schema: &Schema) -> BTreeSet { if schema.is_displayed_all() { ["*"].iter().map(|s| s.to_string()).collect() } else {