Implement ErrorCode on the milli::Error type

This commit is contained in:
Kerollmops 2022-10-04 10:38:17 +02:00 committed by Clément Renault
parent 478e3f0f6b
commit b83710ea98
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
6 changed files with 45 additions and 10 deletions

View file

@ -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))

View file

@ -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;