diff --git a/Cargo.lock b/Cargo.lock index 575f582bc..e3c00257d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -961,6 +961,7 @@ dependencies = [ "askama_warp", "byte-unit", "bytes 0.5.6", + "crossbeam-channel", "either", "flate2", "fst", @@ -1365,7 +1366,6 @@ dependencies = [ "bstr", "byteorder", "chrono", - "crossbeam-channel", "csv", "either", "flate2", diff --git a/http-ui/Cargo.toml b/http-ui/Cargo.toml index de95ce3a6..970d1d9bf 100644 --- a/http-ui/Cargo.toml +++ b/http-ui/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] anyhow = "1.0.38" byte-unit = { version = "4.0.9", default-features = false, features = ["std"] } +crossbeam-channel = "0.5.0" grenad = { git = "https://github.com/Kerollmops/grenad.git", rev = "3adcb26" } heed = "0.10.6" meilisearch-tokenizer = { git = "https://github.com/meilisearch/Tokenizer.git", tag = "v0.2.2" } diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index b6a894373..1f91e6370 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -1,3 +1,5 @@ +mod update_store; + use std::{io, mem}; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::fmt::Display; @@ -29,10 +31,12 @@ use tokio::sync::broadcast; use warp::{Filter, http::Response}; use warp::filters::ws::Message; -use milli::{FilterCondition, Index, MatchingWords, obkv_to_json, SearchResult, UpdateStore}; +use milli::{FilterCondition, Index, MatchingWords, obkv_to_json, SearchResult}; use milli::update::{IndexDocumentsMethod, Setting, UpdateBuilder, UpdateFormat}; use milli::update::UpdateIndexingStep::*; +use self::update_store::UpdateStore; + static GLOBAL_THREAD_POOL: OnceCell = OnceCell::new(); #[derive(Debug, StructOpt)] diff --git a/milli/src/update_store.rs b/http-ui/src/update_store.rs similarity index 99% rename from milli/src/update_store.rs rename to http-ui/src/update_store.rs index 7211a6293..122ee6031 100644 --- a/milli/src/update_store.rs +++ b/http-ui/src/update_store.rs @@ -1,3 +1,5 @@ +#![allow(unused)] + use std::path::Path; use std::sync::Arc; @@ -6,7 +8,7 @@ use heed::types::{OwnedType, DecodeIgnore, SerdeJson, ByteSlice}; use heed::{EnvOpenOptions, Env, Database}; use serde::{Serialize, Deserialize}; -use crate::BEU64; +pub type BEU64 = heed::zerocopy::U64; #[derive(Clone)] pub struct UpdateStore { diff --git a/milli/Cargo.toml b/milli/Cargo.toml index abcded8c9..3e755d088 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -9,7 +9,6 @@ anyhow = "1.0.38" bstr = "0.2.15" byteorder = "1.4.2" chrono = { version = "0.4.19", features = ["serde"] } -crossbeam-channel = "0.5.0" csv = "1.1.5" either = "1.6.1" flate2 = "1.0.20" diff --git a/milli/src/lib.rs b/milli/src/lib.rs index 39e107073..8c1ed514c 100644 --- a/milli/src/lib.rs +++ b/milli/src/lib.rs @@ -4,7 +4,6 @@ mod criterion; mod external_documents_ids; mod fields_ids_map; mod search; -mod update_store; pub mod facet; pub mod heed_codec; pub mod index; @@ -29,7 +28,6 @@ pub use self::heed_codec::{RoaringBitmapLenCodec, BoRoaringBitmapLenCodec, CboRo pub use self::index::Index; pub use self::search::{Search, FacetDistribution, FilterCondition, SearchResult, MatchingWords}; pub use self::tree_level::TreeLevel; -pub use self::update_store::UpdateStore; pub type FastMap4 = HashMap>; pub type FastMap8 = HashMap>;