mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
feat: Define a DocIndex
struct
This commit is contained in:
parent
a2958250c5
commit
3a194bfcc7
3 changed files with 69 additions and 21 deletions
|
@ -16,10 +16,10 @@ use tokio_minihttp::{Request, Response, Http};
|
|||
use tokio_proto::TcpServer;
|
||||
use tokio_service::Service;
|
||||
|
||||
use raptor::{Map, OpWithStateBuilder, LevBuilder, Value};
|
||||
use raptor::{DocIndexMap, OpWithStateBuilder, LevBuilder};
|
||||
|
||||
struct MainService {
|
||||
map: Arc<Map<Value>>,
|
||||
map: Arc<DocIndexMap>,
|
||||
lev_builder: Arc<LevBuilder>,
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ fn main() {
|
|||
let map = {
|
||||
let fst = fs::read("map.fst").unwrap();
|
||||
let values = fs::read("values.vecs").unwrap();
|
||||
let map = Map::from_bytes(fst, &values).unwrap();
|
||||
let map = DocIndexMap::from_bytes(fst, &values).unwrap();
|
||||
Arc::new(map)
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue