get rids of the index crate + the document_types crate

This commit is contained in:
Tamo 2022-10-11 17:42:43 +02:00 committed by Clément Renault
parent f3ec39a769
commit f456fb5e0b
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
30 changed files with 316 additions and 2207 deletions

View file

@ -5,13 +5,12 @@ use std::sync::{Arc, RwLock};
use std::{fs, thread};
use log::error;
use milli::Index;
use meilisearch_types::heed::types::{SerdeBincode, Str};
use meilisearch_types::heed::{Database, Env, EnvOpenOptions, RoTxn, RwTxn};
use meilisearch_types::milli::update::IndexerConfig;
use meilisearch_types::milli::Index;
use uuid::Uuid;
use milli::heed::types::{SerdeBincode, Str};
use milli::heed::{Database, Env, EnvOpenOptions, RoTxn, RwTxn};
use milli::update::IndexerConfig;
use self::IndexStatus::{Available, BeingDeleted};
use crate::{Error, Result};
@ -70,7 +69,7 @@ impl IndexMapper {
fs::create_dir_all(&index_path)?;
let mut options = EnvOpenOptions::new();
options.map_size(self.index_size);
Ok(milli::Index::new(options, &index_path)?)
Ok(Index::new(options, &index_path)?)
}
error => error,
}
@ -153,7 +152,7 @@ impl IndexMapper {
fs::create_dir_all(&index_path)?;
let mut options = EnvOpenOptions::new();
options.map_size(self.index_size);
let index = milli::Index::new(options, &index_path)?;
let index = Index::new(options, &index_path)?;
entry.insert(Available(index.clone()));
index
}