mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-12 16:08:55 +01:00
fix the way we return the settings
This commit is contained in:
parent
92a7c8cd17
commit
384afb3455
@ -41,13 +41,11 @@ impl Index {
|
|||||||
|
|
||||||
let displayed_attributes = self
|
let displayed_attributes = self
|
||||||
.displayed_fields(&txn)?
|
.displayed_fields(&txn)?
|
||||||
.map(|fields| fields.into_iter().map(String::from).collect())
|
.map(|fields| fields.into_iter().map(String::from).collect());
|
||||||
.unwrap_or_else(|| vec!["*".to_string()]);
|
|
||||||
|
|
||||||
let searchable_attributes = self
|
let searchable_attributes = self
|
||||||
.searchable_fields(&txn)?
|
.searchable_fields(&txn)?
|
||||||
.map(|fields| fields.into_iter().map(String::from).collect())
|
.map(|fields| fields.into_iter().map(String::from).collect());
|
||||||
.unwrap_or_else(|| vec!["*".to_string()]);
|
|
||||||
|
|
||||||
let faceted_attributes = self
|
let faceted_attributes = self
|
||||||
.faceted_fields(&txn)?
|
.faceted_fields(&txn)?
|
||||||
@ -71,8 +69,8 @@ impl Index {
|
|||||||
let distinct_attribute = self.distinct_attribute(&txn)?.map(String::from);
|
let distinct_attribute = self.distinct_attribute(&txn)?.map(String::from);
|
||||||
|
|
||||||
Ok(Settings {
|
Ok(Settings {
|
||||||
displayed_attributes: Some(Some(displayed_attributes)),
|
displayed_attributes: Some(displayed_attributes),
|
||||||
searchable_attributes: Some(Some(searchable_attributes)),
|
searchable_attributes: Some(searchable_attributes),
|
||||||
attributes_for_faceting: Some(Some(faceted_attributes)),
|
attributes_for_faceting: Some(Some(faceted_attributes)),
|
||||||
ranking_rules: Some(Some(criteria)),
|
ranking_rules: Some(Some(criteria)),
|
||||||
stop_words: Some(Some(stop_words)),
|
stop_words: Some(Some(stop_words)),
|
||||||
|
Loading…
Reference in New Issue
Block a user