mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Introduce exactness criterion
This commit is contained in:
parent
25f75d4d03
commit
a3f8686fbf
5 changed files with 412 additions and 27 deletions
|
@ -65,6 +65,16 @@ impl FieldsIdsMap {
|
|||
pub fn iter(&self) -> impl Iterator<Item=(FieldId, &str)> {
|
||||
self.ids_names.iter().map(|(id, name)| (*id, name.as_str()))
|
||||
}
|
||||
|
||||
/// Iterate over the ids in the ids order.
|
||||
pub fn ids<'a>(&'a self) -> impl Iterator<Item=FieldId> + 'a {
|
||||
self.ids_names.keys().copied()
|
||||
}
|
||||
|
||||
/// Iterate over the names in the ids order.
|
||||
pub fn names(&self) -> impl Iterator<Item=&str> {
|
||||
self.ids_names.values().map(AsRef::as_ref)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FieldsIdsMap {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue