mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-12 06:24:29 +01:00
fmt
This commit is contained in:
parent
08fd026ebd
commit
8cd3a1aa57
@ -1,12 +1,13 @@
|
|||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
||||||
use crate::TaskId;
|
|
||||||
use meilisearch_types::batches::BatchId;
|
use meilisearch_types::batches::BatchId;
|
||||||
use meilisearch_types::error::{Code, ErrorCode};
|
use meilisearch_types::error::{Code, ErrorCode};
|
||||||
use meilisearch_types::tasks::{Kind, Status};
|
use meilisearch_types::tasks::{Kind, Status};
|
||||||
use meilisearch_types::{heed, milli};
|
use meilisearch_types::{heed, milli};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
use crate::TaskId;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||||
pub enum DateField {
|
pub enum DateField {
|
||||||
BeforeEnqueuedAt,
|
BeforeEnqueuedAt,
|
||||||
|
@ -3,10 +3,6 @@ use std::sync::{Arc, RwLock};
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use std::{fs, thread};
|
use std::{fs, thread};
|
||||||
|
|
||||||
use self::index_map::IndexMap;
|
|
||||||
use self::IndexStatus::{Available, BeingDeleted, Closing, Missing};
|
|
||||||
use crate::uuid_codec::UuidCodec;
|
|
||||||
use crate::{Error, Result};
|
|
||||||
use meilisearch_types::heed::types::{SerdeJson, Str};
|
use meilisearch_types::heed::types::{SerdeJson, Str};
|
||||||
use meilisearch_types::heed::{Database, Env, RoTxn, RwTxn};
|
use meilisearch_types::heed::{Database, Env, RoTxn, RwTxn};
|
||||||
use meilisearch_types::milli;
|
use meilisearch_types::milli;
|
||||||
@ -17,6 +13,11 @@ use time::OffsetDateTime;
|
|||||||
use tracing::error;
|
use tracing::error;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
use self::index_map::IndexMap;
|
||||||
|
use self::IndexStatus::{Available, BeingDeleted, Closing, Missing};
|
||||||
|
use crate::uuid_codec::UuidCodec;
|
||||||
|
use crate::{Error, Result};
|
||||||
|
|
||||||
mod index_map;
|
mod index_map;
|
||||||
|
|
||||||
const INDEX_MAPPING: &str = "index-mapping";
|
const INDEX_MAPPING: &str = "index-mapping";
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
use crate::utils::ProcessingBatch;
|
use std::borrow::Cow;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use enum_iterator::Sequence;
|
use enum_iterator::Sequence;
|
||||||
use meilisearch_types::milli::{
|
use meilisearch_types::milli::progress::{AtomicSubStep, NamedStep, Progress, ProgressView, Step};
|
||||||
make_atomic_progress, make_enum_progress,
|
use meilisearch_types::milli::{make_atomic_progress, make_enum_progress};
|
||||||
progress::{AtomicSubStep, NamedStep, Progress, ProgressView, Step},
|
|
||||||
};
|
|
||||||
use roaring::RoaringBitmap;
|
use roaring::RoaringBitmap;
|
||||||
use std::{borrow::Cow, sync::Arc};
|
|
||||||
|
use crate::utils::ProcessingBatch;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct ProcessingTasks {
|
pub struct ProcessingTasks {
|
||||||
|
@ -2,11 +2,9 @@ use milli::progress::ProgressView;
|
|||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use time::{Duration, OffsetDateTime};
|
use time::{Duration, OffsetDateTime};
|
||||||
|
|
||||||
use crate::{
|
use crate::batches::{Batch, BatchId, BatchStats};
|
||||||
batches::{Batch, BatchId, BatchStats},
|
use crate::task_view::DetailsView;
|
||||||
task_view::DetailsView,
|
use crate::tasks::serialize_duration;
|
||||||
tasks::serialize_duration,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
|
@ -4,10 +4,8 @@ use milli::progress::ProgressView;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
|
|
||||||
use crate::{
|
use crate::task_view::DetailsView;
|
||||||
task_view::DetailsView,
|
use crate::tasks::{Kind, Status};
|
||||||
tasks::{Kind, Status},
|
|
||||||
};
|
|
||||||
|
|
||||||
pub type BatchId = u32;
|
pub type BatchId = u32;
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
use actix_web::{
|
use actix_web::web::{self, Data};
|
||||||
web::{self, Data},
|
use actix_web::HttpResponse;
|
||||||
HttpResponse,
|
|
||||||
};
|
|
||||||
use deserr::actix_web::AwebQueryParameter;
|
use deserr::actix_web::AwebQueryParameter;
|
||||||
use index_scheduler::{IndexScheduler, Query};
|
use index_scheduler::{IndexScheduler, Query};
|
||||||
use meilisearch_types::{
|
use meilisearch_types::batch_view::BatchView;
|
||||||
batch_view::BatchView, batches::BatchId, deserr::DeserrQueryParamError, error::ResponseError,
|
use meilisearch_types::batches::BatchId;
|
||||||
keys::actions,
|
use meilisearch_types::deserr::DeserrQueryParamError;
|
||||||
};
|
use meilisearch_types::error::ResponseError;
|
||||||
|
use meilisearch_types::keys::actions;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::extractors::{authentication::GuardedData, sequential_extractor::SeqHandler};
|
use super::tasks::TasksFilterQuery;
|
||||||
|
use super::ActionPolicy;
|
||||||
use super::{tasks::TasksFilterQuery, ActionPolicy};
|
use crate::extractors::authentication::GuardedData;
|
||||||
|
use crate::extractors::sequential_extractor::SeqHandler;
|
||||||
|
|
||||||
pub fn configure(cfg: &mut web::ServiceConfig) {
|
pub fn configure(cfg: &mut web::ServiceConfig) {
|
||||||
cfg.service(web::resource("").route(web::get().to(SeqHandler(get_batches))))
|
cfg.service(web::resource("").route(web::get().to(SeqHandler(get_batches))))
|
||||||
|
@ -7,7 +7,6 @@ use std::path::{Path, PathBuf};
|
|||||||
|
|
||||||
use anyhow::{bail, Context};
|
use anyhow::{bail, Context};
|
||||||
use meilisearch_types::versioning::create_version_file;
|
use meilisearch_types::versioning::create_version_file;
|
||||||
|
|
||||||
use v1_10::v1_9_to_v1_10;
|
use v1_10::v1_9_to_v1_10;
|
||||||
use v1_12::v1_11_to_v1_12;
|
use v1_12::v1_11_to_v1_12;
|
||||||
|
|
||||||
|
@ -1,18 +1,13 @@
|
|||||||
use anyhow::bail;
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::{bail, Context};
|
||||||
use meilisearch_types::{
|
use meilisearch_types::heed::types::{SerdeJson, Str};
|
||||||
heed::{
|
use meilisearch_types::heed::{Database, Env, EnvOpenOptions, RoTxn, RwTxn, Unspecified};
|
||||||
types::{SerdeJson, Str},
|
use meilisearch_types::milli::index::{db_name, main_key};
|
||||||
Database, Env, EnvOpenOptions, RoTxn, RwTxn, Unspecified,
|
|
||||||
},
|
|
||||||
milli::index::{db_name, main_key},
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{try_opening_database, try_opening_poly_database, uuid_codec::UuidCodec};
|
|
||||||
|
|
||||||
use super::v1_9;
|
use super::v1_9;
|
||||||
|
use crate::uuid_codec::UuidCodec;
|
||||||
|
use crate::{try_opening_database, try_opening_poly_database};
|
||||||
|
|
||||||
pub type FieldDistribution = std::collections::BTreeMap<String, u64>;
|
pub type FieldDistribution = std::collections::BTreeMap<String, u64>;
|
||||||
|
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use meilisearch_types::{
|
use meilisearch_types::heed::types::Str;
|
||||||
heed::{types::Str, Database, EnvOpenOptions},
|
use meilisearch_types::heed::{Database, EnvOpenOptions};
|
||||||
milli::index::db_name,
|
use meilisearch_types::milli::index::db_name;
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{try_opening_database, try_opening_poly_database, uuid_codec::UuidCodec};
|
use crate::uuid_codec::UuidCodec;
|
||||||
|
use crate::{try_opening_database, try_opening_poly_database};
|
||||||
|
|
||||||
pub fn v1_10_to_v1_11(db_path: &Path) -> anyhow::Result<()> {
|
pub fn v1_10_to_v1_11(db_path: &Path) -> anyhow::Result<()> {
|
||||||
println!("Upgrading from v1.10.0 to v1.11.0");
|
println!("Upgrading from v1.10.0 to v1.11.0");
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
//! The breaking changes that happened between the v1.11 and the v1.12 are:
|
//! The breaking changes that happened between the v1.11 and the v1.12 are:
|
||||||
//! - The new indexer changed the update files format from OBKV to ndjson. https://github.com/meilisearch/meilisearch/pull/4900
|
//! - The new indexer changed the update files format from OBKV to ndjson. https://github.com/meilisearch/meilisearch/pull/4900
|
||||||
|
|
||||||
use std::{io::BufWriter, path::Path};
|
use std::io::BufWriter;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use file_store::FileStore;
|
use file_store::FileStore;
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
use std::{
|
use std::any::TypeId;
|
||||||
any::TypeId,
|
use std::borrow::Cow;
|
||||||
borrow::Cow,
|
use std::sync::atomic::{AtomicU32, Ordering};
|
||||||
sync::{
|
use std::sync::{Arc, RwLock};
|
||||||
atomic::{AtomicU32, Ordering},
|
|
||||||
Arc, RwLock,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user