mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-31 07:23:15 +08:00
feat: Introduce the RankedMap type
This commit is contained in:
parent
e41c551757
commit
f17a05c342
@ -6,6 +6,7 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bincode = "1.1.2"
|
bincode = "1.1.2"
|
||||||
|
hashbrown = { version = "0.1.8", features = ["serde"] }
|
||||||
linked-hash-map = { version = "0.5.2", features = ["serde_impl"] }
|
linked-hash-map = { version = "0.5.2", features = ["serde_impl"] }
|
||||||
meilidb-core = { path = "../meilidb-core", version = "0.1.0" }
|
meilidb-core = { path = "../meilidb-core", version = "0.1.0" }
|
||||||
ordered-float = { version = "1.0.2", features = ["serde"] }
|
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::criterion::Criterion;
|
||||||
use meilidb_core::RawDocument;
|
use meilidb_core::RawDocument;
|
||||||
|
use meilidb_data::{Schema, SchemaAttr, RankedMap};
|
||||||
use meilidb_data::{Schema, SchemaAttr};
|
|
||||||
use meilidb_data::RankedMap;
|
|
||||||
|
|
||||||
/// An helper struct that permit to sort documents by
|
/// An helper struct that permit to sort documents by
|
||||||
/// some of their stored attributes.
|
/// some of their stored attributes.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user