mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Extract PrimaryKey logic to a type
This commit is contained in:
parent
523519fdbf
commit
db2fb86b8b
3 changed files with 184 additions and 0 deletions
|
@ -81,6 +81,12 @@ impl Default for FieldsIdsMap {
|
|||
}
|
||||
}
|
||||
|
||||
impl crate::documents::FieldDistribution for FieldsIdsMap {
|
||||
fn id(&self, name: &str) -> Option<FieldId> {
|
||||
self.id(name)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue