4836: Attach declared localized-attributes subroutes r=dureuill a=dureuill

RC.0 unexpectedly doesn't contain the `GET /indexes/{indexUid}/localized-attributes` and `PUT /indexes/{indexUid}/localized-attributes` subroute.

This PR makes them available.

Co-authored-by: Louis Dureuil <louis@meilisearch.com>
Co-authored-by: Tamo <tamo@meilisearch.com>
This commit is contained in:
meili-bors[bot] 2024-07-30 19:01:54 +00:00 committed by GitHub
commit 25791e3f46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -682,6 +682,7 @@ generate_configure!(
filterable_attributes, filterable_attributes,
sortable_attributes, sortable_attributes,
displayed_attributes, displayed_attributes,
localized_attributes,
searchable_attributes, searchable_attributes,
distinct_attribute, distinct_attribute,
proximity_precision, proximity_precision,

View File

@ -9,6 +9,7 @@ static DEFAULT_SETTINGS_VALUES: Lazy<HashMap<&'static str, Value>> = Lazy::new(|
let mut map = HashMap::new(); let mut map = HashMap::new();
map.insert("displayed_attributes", json!(["*"])); map.insert("displayed_attributes", json!(["*"]));
map.insert("searchable_attributes", json!(["*"])); map.insert("searchable_attributes", json!(["*"]));
map.insert("localized_attributes", json!(null));
map.insert("filterable_attributes", json!([])); map.insert("filterable_attributes", json!([]));
map.insert("distinct_attribute", json!(null)); map.insert("distinct_attribute", json!(null));
map.insert( map.insert(
@ -409,6 +410,7 @@ macro_rules! test_setting_routes {
test_setting_routes!( test_setting_routes!(
filterable_attributes put, filterable_attributes put,
displayed_attributes put, displayed_attributes put,
localized_attributes put,
searchable_attributes put, searchable_attributes put,
distinct_attribute put, distinct_attribute put,
stop_words put, stop_words put,