mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +08:00
re-export milli from meilisearch_lib
This commit is contained in:
parent
1cc733f801
commit
3503fbf7fe
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1678,7 +1678,6 @@ dependencies = [
|
|||||||
"meilisearch-lib",
|
"meilisearch-lib",
|
||||||
"meilisearch-tokenizer",
|
"meilisearch-tokenizer",
|
||||||
"memmap",
|
"memmap",
|
||||||
"milli",
|
|
||||||
"mime",
|
"mime",
|
||||||
"mockall",
|
"mockall",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
|
@ -49,7 +49,6 @@ meilisearch-lib = { path = "../meilisearch-lib" }
|
|||||||
meilisearch-error = { path = "../meilisearch-error" }
|
meilisearch-error = { path = "../meilisearch-error" }
|
||||||
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" }
|
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" }
|
||||||
memmap = "0.7.0"
|
memmap = "0.7.0"
|
||||||
milli = { path = "../../milli/milli" }
|
|
||||||
mime = "0.3.16"
|
mime = "0.3.16"
|
||||||
num_cpus = "1.13.0"
|
num_cpus = "1.13.0"
|
||||||
once_cell = "1.8.0"
|
once_cell = "1.8.0"
|
||||||
|
@ -7,7 +7,7 @@ use actix_web::http::StatusCode;
|
|||||||
use actix_web::HttpResponseBuilder;
|
use actix_web::HttpResponseBuilder;
|
||||||
use aweb::error::{JsonPayloadError, QueryPayloadError};
|
use aweb::error::{JsonPayloadError, QueryPayloadError};
|
||||||
use meilisearch_error::{Code, ErrorCode};
|
use meilisearch_error::{Code, ErrorCode};
|
||||||
use milli::UserError;
|
use meilisearch_lib::milli;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
@ -68,6 +68,8 @@ impl fmt::Display for MilliError<'_> {
|
|||||||
|
|
||||||
impl ErrorCode for MilliError<'_> {
|
impl ErrorCode for MilliError<'_> {
|
||||||
fn error_code(&self) -> Code {
|
fn error_code(&self) -> Code {
|
||||||
|
use milli::UserError;
|
||||||
|
|
||||||
match self.0 {
|
match self.0 {
|
||||||
milli::Error::InternalError(_) => Code::Internal,
|
milli::Error::InternalError(_) => Code::Internal,
|
||||||
milli::Error::IoError(_) => Code::Internal,
|
milli::Error::IoError(_) => Code::Internal,
|
||||||
|
@ -5,7 +5,7 @@ use futures::{Stream, StreamExt};
|
|||||||
use log::debug;
|
use log::debug;
|
||||||
use meilisearch_lib::MeiliSearch;
|
use meilisearch_lib::MeiliSearch;
|
||||||
use meilisearch_lib::index_controller::{DocumentAdditionFormat, Update};
|
use meilisearch_lib::index_controller::{DocumentAdditionFormat, Update};
|
||||||
use milli::update::IndexDocumentsMethod;
|
use meilisearch_lib::milli::update::IndexDocumentsMethod;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
|
@ -15,7 +15,7 @@ macro_rules! make_setting_route {
|
|||||||
use log::debug;
|
use log::debug;
|
||||||
use actix_web::{web, HttpResponse, Resource};
|
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 meilisearch_lib::{MeiliSearch, index::Settings, index_controller::Update};
|
||||||
|
|
||||||
use crate::error::ResponseError;
|
use crate::error::ResponseError;
|
||||||
|
@ -50,7 +50,7 @@ pub enum UpdateType {
|
|||||||
|
|
||||||
impl From<&UpdateStatus> for UpdateType {
|
impl From<&UpdateStatus> for UpdateType {
|
||||||
fn from(other: &UpdateStatus) -> Self {
|
fn from(other: &UpdateStatus) -> Self {
|
||||||
use milli::update::IndexDocumentsMethod::*;
|
use meilisearch_lib::milli::update::IndexDocumentsMethod::*;
|
||||||
match other.meta() {
|
match other.meta() {
|
||||||
Update::DocumentAddition{ method, .. } => {
|
Update::DocumentAddition{ method, .. } => {
|
||||||
let number = match other {
|
let number = match other {
|
||||||
|
@ -7,6 +7,8 @@ pub mod index_controller;
|
|||||||
|
|
||||||
pub use index_controller::{IndexController as MeiliSearch, updates::store::Update};
|
pub use index_controller::{IndexController as MeiliSearch, updates::store::Update};
|
||||||
|
|
||||||
|
pub use milli;
|
||||||
|
|
||||||
mod compression;
|
mod compression;
|
||||||
mod document_formats;
|
mod document_formats;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user