re-export milli from meilisearch_lib

This commit is contained in:
mpostma 2021-09-28 22:08:03 +02:00
parent 1cc733f801
commit 3503fbf7fe
7 changed files with 8 additions and 6 deletions

1
Cargo.lock generated
View File

@ -1678,7 +1678,6 @@ dependencies = [
"meilisearch-lib",
"meilisearch-tokenizer",
"memmap",
"milli",
"mime",
"mockall",
"num_cpus",

View File

@ -49,7 +49,6 @@ meilisearch-lib = { path = "../meilisearch-lib" }
meilisearch-error = { path = "../meilisearch-error" }
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" }
memmap = "0.7.0"
milli = { path = "../../milli/milli" }
mime = "0.3.16"
num_cpus = "1.13.0"
once_cell = "1.8.0"

View File

@ -7,7 +7,7 @@ use actix_web::http::StatusCode;
use actix_web::HttpResponseBuilder;
use aweb::error::{JsonPayloadError, QueryPayloadError};
use meilisearch_error::{Code, ErrorCode};
use milli::UserError;
use meilisearch_lib::milli;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
@ -68,6 +68,8 @@ impl fmt::Display for MilliError<'_> {
impl ErrorCode for MilliError<'_> {
fn error_code(&self) -> Code {
use milli::UserError;
match self.0 {
milli::Error::InternalError(_) => Code::Internal,
milli::Error::IoError(_) => Code::Internal,

View File

@ -5,7 +5,7 @@ use futures::{Stream, StreamExt};
use log::debug;
use meilisearch_lib::MeiliSearch;
use meilisearch_lib::index_controller::{DocumentAdditionFormat, Update};
use milli::update::IndexDocumentsMethod;
use meilisearch_lib::milli::update::IndexDocumentsMethod;
use serde::Deserialize;
use serde_json::Value;
use tokio::sync::mpsc;

View File

@ -15,7 +15,7 @@ macro_rules! make_setting_route {
use log::debug;
use actix_web::{web, HttpResponse, Resource};
use milli::update::Setting;
use meilisearch_lib::milli::update::Setting;
use meilisearch_lib::{MeiliSearch, index::Settings, index_controller::Update};
use crate::error::ResponseError;

View File

@ -50,7 +50,7 @@ pub enum UpdateType {
impl From<&UpdateStatus> for UpdateType {
fn from(other: &UpdateStatus) -> Self {
use milli::update::IndexDocumentsMethod::*;
use meilisearch_lib::milli::update::IndexDocumentsMethod::*;
match other.meta() {
Update::DocumentAddition{ method, .. } => {
let number = match other {

View File

@ -7,6 +7,8 @@ pub mod index_controller;
pub use index_controller::{IndexController as MeiliSearch, updates::store::Update};
pub use milli;
mod compression;
mod document_formats;