mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-02-20 09:38:00 +08:00
update the distinct attributes to the spec update
This commit is contained in:
parent
25d057b75e
commit
93ab019304
@ -314,7 +314,11 @@ make_setting_route!(
|
|||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
analytics.publish(
|
analytics.publish(
|
||||||
"DistinctAttribute Updated".to_string(),
|
"DistinctAttribute Updated".to_string(),
|
||||||
json!({ "distinct_attribute": distinct.is_some() }),
|
json!({
|
||||||
|
"distinct_attribute": {
|
||||||
|
"set": distinct.is_some(),
|
||||||
|
}
|
||||||
|
}),
|
||||||
Some(req),
|
Some(req),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -445,7 +449,9 @@ pub async fn update_all(
|
|||||||
"total": new_settings.filterable_attributes.as_ref().set().map(|filter| filter.len()),
|
"total": new_settings.filterable_attributes.as_ref().set().map(|filter| filter.len()),
|
||||||
"has_geo": new_settings.filterable_attributes.as_ref().set().map(|filter| filter.iter().any(|s| s == "_geo")),
|
"has_geo": new_settings.filterable_attributes.as_ref().set().map(|filter| filter.iter().any(|s| s == "_geo")),
|
||||||
},
|
},
|
||||||
"distinct_attribute": new_settings.distinct_attribute.as_ref().set().is_some(),
|
"distinct_attribute": {
|
||||||
|
"set": new_settings.distinct_attribute.as_ref().set().is_some()
|
||||||
|
},
|
||||||
"typo_tolerance": {
|
"typo_tolerance": {
|
||||||
"enabled": new_settings.typo_tolerance
|
"enabled": new_settings.typo_tolerance
|
||||||
.as_ref()
|
.as_ref()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user