mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
feat: Introduce the RankedMap type
This commit is contained in:
parent
e41c551757
commit
f17a05c342
@ -6,6 +6,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bincode = "1.1.2"
|
||||
hashbrown = { version = "0.1.8", features = ["serde"] }
|
||||
linked-hash-map = { version = "0.5.2", features = ["serde_impl"] }
|
||||
meilidb-core = { path = "../meilidb-core", version = "0.1.0" }
|
||||
ordered-float = { version = "1.0.2", features = ["serde"] }
|
||||
|
5
meilidb-data/src/ranked_map.rs
Normal file
5
meilidb-data/src/ranked_map.rs
Normal file
@ -0,0 +1,5 @@
|
||||
use hashbrown::HashMap;
|
||||
use meilidb_core::DocumentId;
|
||||
use crate::{SchemaAttr, Number};
|
||||
|
||||
pub type RankedMap = HashMap<(DocumentId, SchemaAttr), Number>;
|
@ -4,9 +4,7 @@ use std::fmt;
|
||||
|
||||
use meilidb_core::criterion::Criterion;
|
||||
use meilidb_core::RawDocument;
|
||||
|
||||
use meilidb_data::{Schema, SchemaAttr};
|
||||
use meilidb_data::RankedMap;
|
||||
use meilidb_data::{Schema, SchemaAttr, RankedMap};
|
||||
|
||||
/// An helper struct that permit to sort documents by
|
||||
/// some of their stored attributes.
|
||||
|
Loading…
Reference in New Issue
Block a user