mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Implement ErrorCode on the milli::Error type
This commit is contained in:
parent
478e3f0f6b
commit
b83710ea98
6 changed files with 45 additions and 10 deletions
|
@ -13,7 +13,6 @@ pub mod metrics;
|
|||
pub mod route_metrics;
|
||||
|
||||
use std::sync::{atomic::AtomicBool, Arc};
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::error::MeilisearchHttpError;
|
||||
use actix_web::error::JsonPayloadError;
|
||||
|
@ -21,7 +20,6 @@ use actix_web::web::Data;
|
|||
use analytics::Analytics;
|
||||
use error::PayloadError;
|
||||
use http::header::CONTENT_TYPE;
|
||||
use index_scheduler::milli::update::IndexerConfig;
|
||||
pub use option::Opt;
|
||||
|
||||
use actix_web::{web, HttpRequest};
|
||||
|
@ -29,7 +27,6 @@ use actix_web::{web, HttpRequest};
|
|||
use extractors::payload::PayloadConfig;
|
||||
use index_scheduler::IndexScheduler;
|
||||
use meilisearch_auth::AuthController;
|
||||
use sysinfo::{RefreshKind, System, SystemExt};
|
||||
|
||||
pub static AUTOBATCHING_ENABLED: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
use std::convert::TryFrom;
|
||||
use std::sync::Arc;
|
||||
|
||||
use actix_web::web::Data;
|
||||
use actix_web::{web, HttpRequest, HttpResponse};
|
||||
use index::Index;
|
||||
use index_scheduler::milli::FieldDistribution;
|
||||
use index_scheduler::{IndexScheduler, KindWithContent, Query, Status};
|
||||
use log::debug;
|
||||
|
@ -74,7 +70,6 @@ pub async fn list_indexes(
|
|||
) -> Result<HttpResponse, ResponseError> {
|
||||
let search_rules = &index_scheduler.filters().search_rules;
|
||||
let indexes: Vec<_> = index_scheduler.indexes()?;
|
||||
let nb_indexes = indexes.len();
|
||||
let indexes = indexes
|
||||
.iter()
|
||||
.filter(|index| search_rules.is_index_authorized(&index.name))
|
||||
|
|
|
@ -16,7 +16,7 @@ use meilisearch_types::star_or::StarOr;
|
|||
use crate::analytics::Analytics;
|
||||
use crate::extractors::authentication::{policies::*, GuardedData};
|
||||
|
||||
use self::indexes::{IndexStats, IndexView};
|
||||
use self::indexes::IndexStats;
|
||||
|
||||
mod api_key;
|
||||
mod dump;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue