mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
reset value of searchable and displayed attributes; fix #473
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Iter;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@ -45,8 +46,13 @@ impl FieldsMap {
|
||||
pub fn name<I: Into<FieldId>>(&self, id: I) -> Option<&str> {
|
||||
self.id_map.get(&id.into()).map(|s| s.as_str())
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> Iter<'_, String, FieldId> {
|
||||
self.name_map.iter()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
Reference in New Issue
Block a user